std.logger
Jacob Carlborg
doob at me.com
Thu Aug 22 08:59:22 PDT 2013
On 2013-08-22 17:17, Robert Schadek wrote:
> I know. I did this because with the last logger, people where
> complaining that log, info, warning ... where to common names.
> I'm very open for suggestion here. lowercase or otherwise.
My suggestion is you define a single function "log". This returns an
instance of the current/default logger. The logger, be it a struct or
class, have one method for each logging level. The default logging level
would use opCall, resulting in this API:
log("asd"); // log with default level
log.warning("foo"); // log with warning level
log.error("asd"); //
And so on. Then you would only have one function at the module level.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list