Implementing std.log

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 9 08:49:14 PDT 2011


On 5/9/11 10:37 AM, Jacob Carlborg wrote:
> Isn't the name of the log file a little too verbose? Don't know if I'm
> missing something but this doesn't seem so useful for long running
> application that use logging. As far as I know you usually have one log
> file per application and outputs the message along with the level and
> date and time.

I did what glog does. Going forward, there is a private static string 
for formatting file names using positional parameters. In the future I'm 
considering providing an API for changing that format string, which 
means the log file format will be user-definable. (Same about the format 
of individual messages - see the string constants fileNameFormat and 
format toward the top of log.d.) Positional parameters look a bit odd 
but they are quite flexible.

Andrei



More information about the Digitalmars-d mailing list