src/utils.c: tee request_log() to /tmp/libva-fourier.log
Sandboxed processes (Chromium GPU process etc.) redirect stderr, so request_log() output never reaches our test harness. Add a lazy-open append to /tmp/libva-fourier.log so we can capture diagnostic logging regardless of process sandboxing. Will revert before final. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+14
@@ -33,10 +33,24 @@
|
|||||||
void request_log(const char *format, ...)
|
void request_log(const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list arguments;
|
va_list arguments;
|
||||||
|
static FILE *trace_fp;
|
||||||
|
|
||||||
fprintf(stderr, "%s: ", V4L2_REQUEST_STR_VENDOR);
|
fprintf(stderr, "%s: ", V4L2_REQUEST_STR_VENDOR);
|
||||||
|
|
||||||
va_start(arguments, format);
|
va_start(arguments, format);
|
||||||
vfprintf(stderr, format, arguments);
|
vfprintf(stderr, format, arguments);
|
||||||
va_end(arguments);
|
va_end(arguments);
|
||||||
|
|
||||||
|
/* Fourier-local: also tee to /tmp/libva-fourier.log so messages are
|
||||||
|
* visible from sandboxed GPU processes (Chromium etc.) where stderr
|
||||||
|
* is redirected. Append-mode, lazy-open. */
|
||||||
|
if (trace_fp == NULL)
|
||||||
|
trace_fp = fopen("/tmp/libva-fourier.log", "a");
|
||||||
|
if (trace_fp != NULL) {
|
||||||
|
fprintf(trace_fp, "%s: ", V4L2_REQUEST_STR_VENDOR);
|
||||||
|
va_start(arguments, format);
|
||||||
|
vfprintf(trace_fp, format, arguments);
|
||||||
|
va_end(arguments);
|
||||||
|
fflush(trace_fp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user