Early review of std.logger

Jeremy Powers jpowers at wyrdtech.com
Mon Oct 14 15:09:42 PDT 2013


On Mon, Oct 14, 2013 at 2:27 PM, Dicebot <public at dicebot.lv> wrote:

> I'd like to have module-specific logging _without_ creating local module
> instance. And without referring to specific logger at all. As I have
> mentioned, something like:
> ```
> import log = std.logger;
> log.local.info(...); // uses special default logger that inspects
> __MODULE__
> log.global.error(...); // uses normal default logger
>
> ```
>

This idea sounds great (esp. if paired with hierarchical loggers I have
been talking about).  If I'm importing std.logger, chances are I am going
to create a logger for the module.
Would eliminate a bunch of boilerplate 'logger log =
logfactory.getMeALog(modulename)'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131014/a74ac486/attachment.html>


More information about the Digitalmars-d mailing list