Description
Hi,
this is a feature request for golang.org/x/sys
. Not sure, if I have to open a proposal.
Sending logs tough golang.org/x/sys/windows/svc/eventlog
are every limited. Windows has a builtin translation table based on the event id. The Log messages sent by golang.org/x/sys/windows/svc/eventlog
are only viewable by the Details
tab, since a translated message will be displayed in front of it.
However, Windows has a generic error message ('%1 %2 %3 %4 %5 %6 %7 %8 %9'
) defined as event id 3299 which looks suitable for generic log messages.
Other software components like Apache Web Server are using this event id for years:
However, the methods Info
, Warn
, Error
of (golang.org/x/sys/windows/svc/eventlog).Log
accepted only one string as argument and
(golang.org/x/sys/windows/svc/eventlog).report
force 1
for the numStrings argument.
This results into messages like this:
It would be great, if golang.org/x/sys/windows/svc/eventlog
would support sending events with 9 strings.
Using the generic error messages requires numStrings 9 as documented in LMErrlog.h
// The call to NetErrorWrite must set nstrings = 9, and provide 9
// ASCIIZ strings. If the caller does not have 9 insertion strings,
// provide null strings for the empty insertion strings.
Metadata
Metadata
Assignees
Type
Projects
Status