Logging best practices

Andre Pany andre at s-e-a-p.de
Sat May 30 19:13:57 UTC 2020


On Saturday, 30 May 2020 at 18:17:21 UTC, mw wrote:
> On Thursday, 25 April 2019 at 10:33:00 UTC, Vladimirs Nordholm 
> wrote:
>> Hello.
>>
>> Is there a current "Best Practices" for logging in D?
>>
>> For the actual logging, I know of `std.experimental.logger`. 
>> However, the `experimental` has kept me away from it.
>>
>> Is it good, or are there any better alternatives?
>
> A related question: how to log to multiple destinations? e.g. 
> both console & log file? any examples?
>
> Thanks.

Please have a look at the unittest in line 108 here 
https://www.github.com/dlang/phobos/tree/384d0427936fc8846b633ac08e212e5107c37d16/std%2Fexperimental%2Flogger%2Fmultilogger.d

Kind regards
Andre


More information about the Digitalmars-d-learn mailing list