Logger for D

sybrandy sybrandy at gmail.com
Fri May 14 14:34:10 PDT 2010

On 05/13/2010 04:05 PM, Masahiro Nakagawa wrote:
> Hi,
> On Wed, 12 May 2010 07:54:23 +0900, sybrandy <sybrandy at gmail.com> wrote:
>> Hello,
>> I just wanted to let everyone know that I created a simple logging 
>> library for D. I wrote it as I wanted to debug my programs without 
>> having to deal with standard output and have used it for several 
>> little coding adventures.
>> https://launchpad.net/dlogger
>> The main features are:
>> - Supports trace, info, dbug (debug), error, and fatal log errors.
>> - Logging levels can be changed while the program is running
>> - Is thread safe (hopefully)
>> - If compiled with -version=nologger, it's like you never included it.
>> Besides satisfying my own needs, I felt that a logging library of some 
>> sort would be good for Phobos, hence why I'm making this available.
>> Please report any issues/suggestions to the launchpad site.
> I want two features.
> - file-size or time-based rotation
> Manual management is very bother.
> - filter
> I think message customization is useful(e.g. coloring for terminal).
> Some loggers support this functionality(Log4j, Boost.log, etc...).
> I once wrote a logger. My logger is here.
> http://www.bitbucket.org/repeatedly/scrap/src/tip/logger.d
> This logger supports above features(Rotation is file-size only).
> Hope this helps.

Cool.  I'll keep that in mind as I try to improve it.  Currently, it
just overwrites the file every run, however my use case was programs
that run til completion, so that was perfectly acceptable.  Granted,
I've been toying with some server code, but even then I don't have it
running very long.  I first need to focus on replacing std.stream for
writing to the logfile.



More information about the Digitalmars-d mailing list