Log stderr for crosvm |
||
Issue descriptionCurrently stdout is logged via logger for crosvm, but stderr is not. stderr is used for virglrenderer/virtio-gpu errors, and could potentially be used elsewhere. One possible easily solution would be to dup2(STDOUT_FILENO, STDERR_FILENO) when logger is being started. Alternatively, a second logger instance could be created if that doesn't work.
,
Oct 18
re #1: crosvm uses syslog and so doesn't rely on slurping by anybody else. A library loaded, virglrenderer in this case, uses fprintf(stderr, ...) all over the place. That's harder to fix because its part of an upstream package.
,
Oct 18
assuming crosvm (or its children) are the ones using virglrenderer, seems like something crosvm should be handling rather than vm_tools. it can create a pipe to bind its stdout/stderr for its random libs that have poor logging semantics, and then add that fd to whatever event loop you have to convert it to syslog calls. then there's no need for `logger`.
,
Oct 18
crosvm currently has stdout going to syslog via the logger process? Or are there some other paths where it directly logs as well?
,
Oct 18
yes, we're using `logger` currently. a dup of stderr to stdout would keep the status quo while also including stderr. my suggestion was for beyond that and stop using `logger` entirely.
,
Nov 2
,
Nov 2
to be clear, i don't think it's a problem to approach this incrementally -- we're already spinning up logger and sending it output, so doing the stderr duping shouldn't be too hard. we can then keep debating how to get rid of `logger`. |
||
►
Sign in to add a comment |
||
Comment 1 by vapier@chromium.org
, Oct 17