Early review of std.logger

Robert Schadek realburner at gmx.de
Tue Oct 15 01:58:14 PDT 2013


On 10/15/2013 09:44 AM, ilya-stromberg wrote:
> On Monday, 14 October 2013 at 12:48:14 UTC, Martin Drasar wrote:
>> 1) MultiLogger class that takes references to other loggers and just
>> forwards the call to the log function.
>
> +1
> Also, we should support a few loggers whith same type. For example, I
> can use 2 file loggers: the 1-st only for debug messages and the 2-nd
> for all other messages. It can help for message sorting.
>
> Also, we should support a reserve loggers. For example, I can use a
> file logger as a default and a syslog as a reserve logger (it will be
> used if the file logger fails). It increases logger reliability.
>
> Also, it will be perfect to have logger failed notifications. For
> example, the file logger failed can indicate that we haven't got free
> disc space, a file system problems or hard disk problems. So, we
> should inform admin about this problems. We can do it via stderr (for
> local computer only), via syslog network logger or via e-mail logger.
I think File will throw anyway. What if stderr is piped to file? Again,
I don't think you can please everybody's needs. So we should not try,
but rather provide the tools to help yourself.


More information about the Digitalmars-d mailing list