Logging logs in Windows

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Feb 3 18:02:59 UTC 2023


On 04/02/2023 6:55 AM, Alexander Zhirov wrote:
> On Friday, 3 February 2023 at 16:00:55 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> Yes syslog is not available on Windows as that is a Posix API. All of 
>> your calls to syslog should be guarded by a version for Posix.
> 
> Is there an analogue for Windows? And is it possible to implement it 
> with the similarity of directives, as in C?

The analogue is the Windows Event Log and its not 1:1.

Here is a starting point that I myself have used in the past:

https://github.com/php/php-src/blob/master/win32/wsyslog.c


More information about the Digitalmars-d-learn mailing list