- Nov 21, 2022
-
-
Simon McVittie authored
This serves the same function: sacrifice speed for predictability in order to get logs that can be compared line-by-line. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Fixes: 516b106c "log: Add Journal integration to GLib log handler" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Further logging improvements See merge request !521
-
Simon McVittie authored
Adding annotations to these functions means mypy will attempt to analyze them. It doesn't have particularly good information for PyGI code, but something is better than nothing. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 17, 2022
-
-
Simon McVittie authored
This redirects output produced by pv-wrap, but puts back the original stdout/stderr for the wrapped program (typically the actual game). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This redirects output produced by pv-adverb, but puts back the original stdout/stderr for the wrapped program (typically the actual game). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This has three main functions: - If stdout and/or stderr are /dev/null, send warnings to the systemd Journal so they don't get lost, along with debug messages if enabled. - If the user requests it, redirect stdout and/or stderr to the systemd Journal so that everything will be logged in one place. - If stdout and/or stderr is already a Journal file descriptor inherited from a parent process, reopen it with our own details, and send our log messages with a bit more metadata. This obsoletes _srt_util_set_up_logging(), which did the first two of those. This is a per-application opt-in, because each application that will make use of this needs to be aware that it might redirect stdout and stderr. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We can use this the same way GLib does: to detect that stdout or stderr is an inherited Journal stream, so that we can try to do our own Journal logging in preference to using that stream. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This does a few closely related things. If standard input, standard output and standard error are closed, we open them to point to /dev/null, and if they are close-on-exec, we clear their close-on-exec flags. This is to avoid weird side effects: most APIs like open() that create new file descriptors guarantee to use the lowest-numbered fd that is not already in use, but users of those APIs do not expect to be overwriting stdin/stdout/stderr. Because that operation can involve changing the meaning of stdout and stderr, we now optionally save a duplicate of the original standard output and standard error, so they can be put back later. Because we're now saving a duplicate of the original standard output and standard error, it also makes sense to implement SRT_LOG_FLAGS_DIVERT_STDOUT here. This avoids needing to call _srt_divert_stdout_to_stderr() separately in most callers. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
In some places, and especially in these logging functions, we can encounter situations that deserve a warning but should not result in program failure, even during unit testing or debugging with G_DEBUG=fatal-warnings. If _srt_log_failure() is like a non-fatal g_error(), then _srt_log_warning() is like a non-fatal g_warning(). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we are going to write to the systemd Journal, we will want the program name to already be known, so that we can use it as the syslog identifier (first argument to sd_journal_stream_fd() and openlog()). This also reduces duplication a bit, and brings us one step closer to combining _srt_util_set_up_logging() with _srt_util_set_glib_log_handler(). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
launch-client: Print version number, --bus-name to original stdout See merge request !520
-
- Nov 16, 2022
-
-
Simon McVittie authored
These were intended to be written to the original stdout, but we didn't do that until after we'd already replaced stdout with stderr to avoid random diagnostic messages appearing on the original stdout. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 15, 2022
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
In older chroot environments it's sometimes a symbolic link to /run/shm. Use /dev/pts as something that is more likely to be a real directory, and skip this part of the test if /dev/pts is somehow also a symlink. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
pv-locale-gen: Show a warning if we generated any locales See merge request !519
-
- Nov 14, 2022
-
-
Simon McVittie authored
This will give users a hint about how they can speed up container setup. Helps: https://github.com/ValveSoftware/steam-runtime/issues/541 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we already know that we need to generate at least one locale, then testing more is a waste of time. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we have detected a particular locale as missing, we only need to generate it once. This makes the script output a lot less repetitive, and speeds it up by about 30%. Fixes: e69ce85e "locale-gen: Add --output-dir option" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 09, 2022
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 07, 2022
-
-
Ludovico de Nittis authored
log: Add a flags parameter to _srt_util_set_glib_log_handler See merge request !517
-
Ludovico de Nittis authored
pv-runtime: Use more file-descriptor-relative I/O See merge request !515
-
- Nov 03, 2022
-
-
Simon McVittie authored
This disables performance profiling (timing) and removes the process ID from log messages, unless overridden by more specific flags. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We can use this to set up different types of logging with a single log handler, which will make it easier to add new flags, such as a flag to make the log more deterministic to minimize diff. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we give a relative path starting with `overrides/`, it's reasonably obvious from context what file we're writing to on the host system and where it will end up in the container. The necessary code restructuring to do this also makes it more obvious that the path `write_to_file` in the current execution environment, the path `json_in_container` in the resulting container, and the debug-log message all match up. We still need `write_to_dir` in `setup_each_json_manifest()`, but only to create the directory we're going to be populating. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This avoids another diff between otherwise similar logs. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This removes some avoidable diff between capsule-capture-libs calls. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We now do all I/O via self->overrides_fd. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This brings us a step closer to having all accesses to /overrides be relative to the overrides_fd, which would make the various absolute and relative paths pointing into /overrides less confusing. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This means we are "naturally" working with relative paths, reducing duplication in our debug log messages. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This gives us shorter log messages based on paths relative to the overrides directory. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-