Introduce stdout/stderr log targets to replace using File to log to stdout#176
Merged
mozzieongit merged 3 commits intomainfrom Oct 14, 2025
Merged
Introduce stdout/stderr log targets to replace using File to log to stdout#176mozzieongit merged 3 commits intomainfrom
mozzieongit merged 3 commits intomainfrom
Conversation
ximon18
approved these changes
Oct 13, 2025
Member
ximon18
left a comment
There was a problem hiding this comment.
LGTM, but I'd like to actually test to see that it solves the systemd problem.
Member
Author
|
I tested it in my VMs with Ubuntu, Debian, and Rocky |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As seen in #163, writing to
/dev/stdoutfails withNo such device or address, due to it being a UNIX socket when run under systemd. This fixes the problem by using Rust's builtin Stdout and Stderr output streams.This also fixes the panic when unable to create the logger update by printing the error using
eprintln!and moving on. Should this cleanly exit the program?Also moves the ansi color codes to a common module for later use when implementing colors for log levels.
Fixes: #163