write generic-worker log output to event log (rather than a log file)
Categories
(Taskcluster :: Workers, enhancement)
Tracking
(Not tracked)
People
(Reporter: grenade, Unassigned)
References
(Blocks 1 open bug)
Details
Updated•7 years ago
|
Comment 1•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 2•5 years ago
|
||
Miles, I think this is covered by the work you are doing in bug 1459203, right?
Comment 3•5 years ago
|
||
Yes, that's correct. We'll be writing to an eventlog with the same name as is specified during the installation of the Generic Worker service (default: "Generic Worker".
The way I've implemented it thus far is to add an output to the log package, this doesn't include all stdout/stderr though. Is capturing output intended to be logged sufficient? Should we switch use of fmt prints to use log?
Comment 4•5 years ago
|
||
(In reply to Miles Crabill [:miles] [also mcrabill@mozilla.com] from comment #3)
Yes, that's correct. We'll be writing to an eventlog with the same name as is specified during the installation of the Generic Worker service (default: "Generic Worker".
The way I've implemented it thus far is to add an output to the log package, this doesn't include all stdout/stderr though. Is capturing output intended to be logged sufficient?
Yes, that's fine.
Should we switch use of fmt prints to use log?
Where have you seen those? I think the only time we intentionally log to standard out from the worker is in response to generic-worker --help|-h|--version
. To be safe, we should send both stderr and stdout to the event log, but if you find code writing to stderr instead of stdout, let's review it - it could be a mistake.
Comment 5•5 years ago
|
||
I don't think I see any real fmt prints besides those, so we're good! Anything logged using the log package will be sent to the event log. Anything that would ordinarily write to stdout/stderr when generic worker is run as a Windows service will go nowhere, as the service has no valid handles / files for either.
Updated•5 years ago
|
Comment 6•4 years ago
|
||
Miles: is there more to do here? Not sure whether comment #5 implies we're done or not.
Comment 7•4 years ago
|
||
I suspect this would get folded into the log work in worker-runner. Basically configuring an event-log backend for worker-runner would do the trick here.
Updated•4 years ago
|
Description
•