srt-logger: New tool to divert command output to a log
By default, this tees output to a log file and its own standard error
stream. It also optionally writes to the systemd Journal.
The log file is written with a size limit: if it would become
larger than its size limit, it's moved out of the way and logging resumes
in a newly created file. This is similar to how the Steam client's
internal logging in C++ code works. Log rotation is automatically
disabled if more than one srt-logger process is trying to write to the
same log, to avoid data loss.
Signed-off-by:
Simon McVittie <smcv@collabora.com>
parent
75ef8c48
No related branches found
No related tags found
Showing
- bin/logger.c 298 additions, 0 deletionsbin/logger.c
- bin/logger.md 212 additions, 0 deletionsbin/logger.md
- bin/meson.build 37 additions, 0 deletionsbin/meson.build
- debian/steam-runtime-tools-bin.install 2 additions, 0 deletionsdebian/steam-runtime-tools-bin.install
- steam-runtime-tools/logger-internal.h 52 additions, 0 deletionssteam-runtime-tools/logger-internal.h
- steam-runtime-tools/logger.c 888 additions, 0 deletionssteam-runtime-tools/logger.c
- steam-runtime-tools/meson.build 2 additions, 0 deletionssteam-runtime-tools/meson.build
- steam-runtime-tools/utils-internal.h 2 additions, 0 deletionssteam-runtime-tools/utils-internal.h
- steam-runtime-tools/utils.c 36 additions, 0 deletionssteam-runtime-tools/utils.c
- tests/meson.build 1 addition, 8 deletionstests/meson.build
Loading
Please register or sign in to comment