Early review of std.logger

ilya-stromberg ilya-stromberg-2009 at yandex.ru
Wed Oct 16 00:18:37 PDT 2013


On Tuesday, 15 October 2013 at 07:52:28 UTC, Robert Schadek wrote:
> On 10/15/2013 04:06 AM, Eric Anderton wrote:
>> Here's what I think is missing:
>> - System log support (as others have mentioned).  This would 
>> be syslog
>> or WEL, depending on environment.
> This is sort of the idea of the design, I can't anticipate your 
> needs
> therefor I should not try. I should try to give you guidelines 
> or a
> framework to work against.
>>
>> - Guarantees or options for working with log rotation 
>> (logrotate.d). It's nice to either know that you must restart 
>> your daemon once logs
>> are rotated, or can configure logging to re-open handles 
>> automatically
>> or when it detects rotation has occurred.
> See previous point

Disagree. We need a log rotation support.
As I can see, available options could be:

* rotating conditions
  - by date (rotate every hour, day (default), week, month, year)
  - by file size (rotate if file size more than ... Mb)
  - by count log lines (rotate if log contains more than ... log 
lines)
  - combination of previous conditions (for example, rotate every 
day or rotate if file size more than 100 Mb)

* file names after rotation
  - by numbers (my.log, my.log.0, my.log.1, ...)
  - by ISO date and time (my-2013-10-16-00-00-00.log)

* ability to use system log rotation utility


More information about the Digitalmars-d mailing list