You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since there can be arbitrary amount of arguments of any type, it's hardly reasonable to add formatting rules to logging facilities. So, there are two ways to control the formatting:
Internally Miniloggers.jl uses string function to create output. So, you can pirate string function for corresponding type and redefine it.
You can use @sprintf or any other similar facilities to control output for each argument. Of course, it can be tedious, but it just work.
Well, expanding on 1. I can define something like present(x) = string(x) and use it for output. This way, you'll need to redefine only present function, which is still a piracy, but not as dramatic as redefining string.
Suppose
x
is a float. I show it with:Usually this prints
x
with full precision. Is there a way to control the formatting (e.g. number of digits) of floating points ?The text was updated successfully, but these errors were encountered: