> best to write to a string buffer
It's best to call a user callback. That way logs can be, for example, displayed in a GUI.
A good logging framework has all the hooks you need
A good logging framework has all the hooks you need