On Thursday, 17 November 2016 at 18:02:02 UTC, Jesse Phillips
wrote:
On Thursday, 17 November 2016 at 17:54:23 UTC, Suliman wrote:
Ok, but when the logger class may be more helpful that
function usage?
You'd use the logger class when you need to make customizations
or have multiple logging schemes.
I'd expect Vibe.d allows you to override the global logging
object. You could then inherit from the Logger class, customize
the behavior and assign it to the global logger which is used
by all the libraries which just call the log() function.
For example I need to write all logs to file. I see this
function, that seem set some global file name.
"setLogFile Sets a log file for disk file logging."
But would it name accessible from anywhere or it would be visible
inly from this scope? If yes is there any way to make it's global?