-
Notifications
You must be signed in to change notification settings - Fork 21
Windows event log #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows event log #141
Conversation
27ec547 to
06013fe
Compare
06013fe to
ae69c03
Compare
ae69c03 to
de4c92c
Compare
|
I think I forgot this, I'll do a fixup of the last commit. |
c7af082 to
c6aac72
Compare
|
Ok, I've now added the DLL that Windows Event viewer needs to print the logged messages nicely. It needs to be registered with Windows: There's just one type of message, the simplicity is intentional. |
c6aac72 to
c91e289
Compare
By reusing the `--worker-name' CLI parameter instead of always opting for "ocluster-worker", we can install multiple OCluster workers as Windows services on the same host. The `remove' CLI parameter becomes `remove <name>' where <name> is the worker to remove from the list of services.
I forgot to self-initialize the random number generator. As the log file is only differentiated by a random number, the log file would be overriden at restart.
Don't report Debug events to avoid being too noisy. Build provider dll to get log messages from Windows event viewers.
c91e289 to
ab9b913
Compare
|
I now think that logging should use TraceLogging on Windows. There are examples of a TraceLogging easy-to-use wrapper with a dynamic implementation that doesn't require to register all logging messages. There are also examples of backend for TraceLogging using LTTng, a library available on Linux, that can help if someone tries to build an OCaml wrapper for TraceLogging. |
This PR integrates the scheduler and workers services with the Windows Event Log by using the win-eventlog package. We still log on Prometheus, the two reporters are combined.
Windows services cannot log onto standard output/error, so when used as services, the workers and the scheduler use a file formatter for Prometheus logging.
The worker doesn't expose Prometheus cmdliner options, so does it make sense to even use Prometheus for logging?
Debug events are too verbose and are not reported into the Windows event log.