Redhat Overall review 1 record SYSTEMD log entry rsyslogd Configure logging directives

Source: Internet
Author: User
Tags rsyslog

Show all SYSTEMD log entries recorded in the/home/student/systemdreview.txt file between 9:05:00 and 9:15:00

# echo "Journalctl--since 9:05:00--until 9:15:00" >/home/student/systemdreview.txt

Add instructions in the/etc/rsyslog.d/auth-errors.conf configuration file to log Authpriv.alert syslog messages to the/var/log/auth-errors file

# echo "Authpriv.alert/var/log/auth-errors" >/etc/rsyslog.d/auth-errors.conf

Restart Rsyslog Service

# systemctl Restart Rsyslog

=================

The following is a test of whether the above settings were successful.

Use: Logger to create a new log record in/var/log/auth-errors

# logger-p Authpriv.alert "Logging test Authpriv.alert"

Verify that the above record is logged in the/var/log/auth-errors system log file

# tail/var/log/auth-errors

My experiment:

Redhat Overall review 1 record SYSTEMD log entry rsyslogd Configure logging directives

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.