syslog.conf(5)
โจ syslog.conf(5) โจ
okay bestie, gather round, because today we're talking about syslog.conf โ the glow-up of a config file from the User's Reference Manual ๐
๐ธ NAME ๐ธ
syslog.conf โ configuration file for syslogd(8)
like, it's literally the settings file that tells the logging daemon what to do. that's the whole vibe. ๐
๐ DESCRIPTION ๐
So <pink>syslog.conf</pink> is the configuration file for the <hotpink>syslogd(8)</hotpink> program. It's made up of lines with two fields, and yes queen, only two:
- the selector field โ this is the part that says which types of messages and priorities this line even applies to ๐ฏ
- the action field โ this says what we actually do when a message that
<cyan>syslogd</cyan>receives matches the selection criteria
The selector field and the action field are separated by one or more tab or space characters. And the way that a rule can be split across several lines?? iconic. Just make sure every line except the last ends with a backslash ("\") and you're golden. โจ
The selectors themselves are encoded as a facility, a period ("."), and a level, with no intervening white-space. And both the facility and the level are case insensitive, so don't stress about caps. ๐ซถ
The facility describes the part of the system that's generating the message, and it's one of these keywords:
auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, syslog, user, uucp and local0 through local7
(ngl those keywords โ with the exception of mark โ correspond to the similar <purple>โLOG_โ</purple> values you pass to the openlog(3) and syslog(3) library routines. iykyk.)
The level describes the severity of the message, and it's a keyword from this ordered list, going higher to lower:
emerg, alert, crit, err, warning, notice and debug
These keywords correspond to the similar (LOG_) values specified to the syslog library routine. ๐ซ
Peep syslog(3) for a further description of both the facility and level keywords and what they actually signify โ it's giving reference material, go read it. ๐
So here's the tea: if a received message matches the specified facility and is of the specified level (or a higher level), the action specified in the action field will be taken. periodt. ๐
Multiple selectors can be specified for a single action by separating them with semicolon (";") characters. BUT โ and this is the important bit โ each selector can modify the ones preceding it. so order matters, bestie, be careful. ๐ญ
Multiple facilities can be specified for a single level by separating them with comma (",") characters. ๐ธ
An asterisk ("*") can be used to specify all facilities or all levels. main character energy: it doesn't discriminate. ๐
By default, a level applies to all messages with the same or higher level. But if you prepend the equal ("=") character to a level, you restrict this line of the configuration file to messages with the very same level. no more, no less. โญ
An exclamation mark ("!") prepended to a level or the asterisk means this line of the configuration file does not apply to the specified level (and higher ones). And in conjunction with the equal sign, you can exclude single levels as well. exclusion era ๐ซ
The special facility "mark" receives a message at priority "info" every 20 minutes (see syslogd(8)). Heads up though: this is not enabled by a facility field containing an asterisk. ๐
The special level "none" disables a particular facility. simple as that. โจ
๐ฆ the action field ๐ฆ
The action field of each line specifies the action to be taken when the selector field selects a message. There are five forms, bestie:
- A pathname (beginning with a leading slash). Selected messages are appended to the file.
You may prepend a minus ("-") to the path to omit syncing the file after each message log. This can cause data loss at system crashes, but it increases performance for programs which use logging extensively. so likeโฆ speed vs safety, choose wisely ๐
- A named pipe (fifo), beginning with a vertical bar (
"|") followed by a pathname. The pipe must be created withmkfifo(8)beforesyslogdreads its configuration file. This feature is especially useful for debugging. ๐ง - A hostname (preceded by an at (
"@") sign). Selected messages are forwarded to thesyslogdprogram on the named host. long-distance relationship logging ๐ - A comma separated list of users. Selected messages are written to those users if they are logged in. ๐ฏ
- An asterisk. Selected messages are written to all logged-in users. ๐ข
Blank lines and lines whose first non-blank character is a hash ("#") character are ignored. (yes, those are your lil comment walls, slay โ๏ธ)
๐ EXAMPLES ๐
A configuration file might appear as follows:
# Log all kernel messages, authentication messages of
# level notice or higher and anything of level err or
# higher to the console.
# Don't log private authentication messages!
*.err;kern.*;auth.notice;authpriv.none /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* /var/log/maillog
# Everybody gets emergency messages, plus log them on another
# machine.
*.emerg *
*.emerg @arpa.berkeley.edu
# Root and Eric get alert and higher messages.
*.alert root,eric
# Save mail and news errors of level err and higher in a
# special file.
uucp,news.crit /var/log/spoolerr
ate, honestly. no crumbs. ๐ฅ
๐ FILES ๐
/etc/syslog.confโ Thesyslogd(8)configuration file./etc/syslog.d/โ The configuration directory.
๐ BUGS ๐
The effects of multiple selectors are sometimes not intuitive. For example:
"mail.crit,*.err"will select"mail"facility messages at the level of"err"or higher, not at the level of"crit"or higher.
so yeah, lowkey a trap. read it twice. ๐ญ
โญ SEE ALSO โญ
and that's the whole page, bestie โ go forth and configure your logs like the icon you are ๐
GNU Network Utilities โข May 6, 2026 โข syslog.conf(5) ๐ซถ
๐ฆ where this page comes from
- ubuntu stonking: inetutils-syslogd 2:2.8-2ubuntu1
- Copyright (c) 1990, 1991, 1993 The Regents of the University of California. All rights reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms