Prev | Current Page 461 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"


The left field is a semicolon-separated list (spaces won??™t work) of message types and message
priorities. The right field is the log file to which those messages should be written.
To send the messages to another computer (the loghost) instead of a file, start by replacing the log
filename with the @ character followed by the name of the loghost. For example, to redirect the
output normally sent to the messages, secure, and maillog log files, make these changes to
the preceding file:
# Log anything (except mail) of level info or higher.
# Don??™t log private authentication messages!
*.info;mail.none;news.none;authpriv.none;cron.none @loghost
# The authpriv file has restricted access.
authpriv.* @loghost
# Log all the mail messages in one place.
mail.* @loghost
The messages will now be sent to the syslogd running on the computer named loghost. The name
loghost was not an arbitrary choice. It is customary to create such a hostname and make it an alias
to the actual system acting as the loghost. That way, if you ever need to switch the loghost duties
to a different machine, you need to change only the loghost alias; you do not need to re-edit the
syslog.conf file on every computer.
On the loghost side, that machine must run syslogd with the -r option, so it will listen on the network
for log messages from other machines.


Pages:
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473