Skip to content

fix windows syslog wrapper severity #1768

@arogge

Description

@arogge

Currently the syslog() implementation on windows reports every message as an error in the windows event log.
I propose that we use the following severity level translation instead:

LOG_EMERG   |
LOG_ALERT   | ==> EVENTLOG_ERROR_TYPE
LOG_CRIT    |
LOG_ERR     |

LOG_WARNING | ==> EVENTLOG_WARNING_TYPE

LOG_NOTICE  |
LOG_INFO    | ==> EVENTLOG_INFORMATION_TYPE
LOG_DEBUG   |
NO SEVERITY |

Additional options:

EVENTLOG_SUCCESS
EVENTLOG_AUDIT_FAILURE
EVENTLOG_AUDIT_SUCCESS

See: https://learn.microsoft.com/en-us/windows/win32/eventlog/event-types

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions