Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay/05core: Set systemd LogColor=false #1079

Open
wants to merge 2 commits into
base: testing-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ EOF
echo "Displaying logs from failed units: ${failed}"
for unit in ${failed}; do
# 10 lines should be enough for everyone
journalctl -b --no-pager --no-hostname -u ${unit} -n 10
# For color suppression, see https://github.com/coreos/fedora-coreos-config/pull/1079
# and 10-coreos-nocolor.conf. Our console logs often end up saved into
# files and the ANSI codes just look like corruption (and are invalid UTF-8).
SYSTEMD_COLORS=0 journalctl -b --no-pager --no-hostname -u ${unit} -n 10
done
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# We deploy on servers. The ANSI colors codes in the console
# output often end up in e.g. log files where they both
# make the logs hard to read *and* they make log files
# invalid UTF-8.
[Manager]
LogColor=false
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# Configuration for systemd in the initramfs.
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

Expand All @@ -7,6 +8,8 @@ depends() {
}

install() {
inst_simple "$moddir/10-coreos-nocolor.conf" \
"/etc/systemd/system.conf.d/00-coreos-nocolor.conf"
inst_simple "$moddir/00-journal-log-forwarding.conf" \
"/etc/systemd/journald.conf.d/00-journal-log-forwarding.conf"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# We deploy on servers. The ANSI colors codes in the console
# output often end up in e.g. log files where they both
# make the logs hard to read *and* they make log files
# invalid UTF-8.
[Manager]
LogColor=false