Files
forgefirm/meta-forgefirm/recipes-extended/rsyslog/rsyslog/rsyslog.conf
T
2026-09-18 12:14:22 -04:00

45 lines
1.9 KiB
Plaintext

# SPDX-License-Identifier: MIT
# /etc/rsyslog.conf - ForgeFIRM
#
# rsyslog is the only log writer on the machine. Every ForgeFIRM process
# (forgectrl, grblHAL, gfcloud, gfhome), the kernel, and everything else
# route to their own directory under /data/log/forgefirm. The per-logger
# disk and remote levels come from /data/forgefirm/forgefirm.conf and are rendered
# into the included rules file at every boot by `forgectrl
# --render-syslog` (see the forgefirm-logging init script), so a change
# made in the control panel applies at the next reboot.
# Inputs: the local syslog socket and the kernel ring buffer. The
# per-process rate limit bounds a runaway logger to a few hundred lines
# per second so it cannot starve the machine; the emitters themselves
# never block on this socket (they drop instead).
module(load="imuxsock" SysSock.Use="on"
SysSock.RateLimit.Interval="10" SysSock.RateLimit.Burst="5000")
module(load="imklog")
global(workDirectory="/var/volatile/tmp"
maxMessageSize="16k")
# One line format for every file: RFC 3339 timestamp with sub-second
# precision, program[pid], SEVERITY, message.
template(name="ff_line" type="list") {
property(name="timegenerated" dateFormat="rfc3339")
constant(value=" ")
property(name="programname")
constant(value="[")
property(name="procid")
constant(value="] ")
property(name="syslogseverity-text" caseConversion="upper")
property(name="msg" spifno1stsp="on")
property(name="msg" droplastlf="on")
constant(value="\n")
}
# The rendered per-logger rules (levels, remote target). Every message
# is consumed there (each block ends in stop). The forgefirm-logging
# init script guarantees the file exists before this daemon starts: it
# writes a default rules file (everything to system/, info and above)
# if the render fails.
include(file="/data/forgefirm/rsyslog-forgefirm.conf" mode="optional")