std.logger

Robert Schadek realburner at gmx.de
Thu Aug 22 08:38:58 PDT 2013


On 08/22/2013 05:32 PM, Craig Dillabaugh wrote:
> On Thursday, 22 August 2013 at 15:17:16 UTC, Robert Schadek wrote:
>> On 08/22/2013 05:06 PM, Johannes Pfau wrote:
>>> It would be nice to finally have logging in phobos.
>>> Two small nit-picks:
>>>
>>> The API doesn't follow the phobos naming conventions: functions (error,
>>> fatal, ...) need to start with a lowercase letter. Same for enum
>>> members. See http://dlang.org/dstyle.html
>> 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.
>
> Would logWarning(), logInfo(), logError() work?  You already have
> a logMessage() in there.
>
> It might be a bit redundant in some instances ( Logger.logError()
> ), but in other cases it be clearer (eg.,  logError("Oh no!
> Something went wrong!").
>
logMessage is meant to do the actual logging. And IMO it is to much to long.
But keep the ideas coming there must be a sweet spot somewhere.



More information about the Digitalmars-d mailing list