Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Linux for System Administrators

You're reading from   Linux for System Administrators Navigate the complex landscape of the Linux OS and command line for effective administration

Arrow left icon
Product type Paperback
Published in Sep 2023
Publisher Packt
ISBN-13 9781803247946
Length 294 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Viorel Rudareanu Viorel Rudareanu
Author Profile Icon Viorel Rudareanu
Viorel Rudareanu
Daniil Baturin Daniil Baturin
Author Profile Icon Daniil Baturin
Daniil Baturin
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1: Linux Basics
2. Chapter 1: Getting to Know Linux FREE CHAPTER 3. Chapter 2: The Shell and Its Commands 4. Chapter 3: The Linux Filesystem 5. Chapter 4: Processes and Process Control 6. Chapter 5: Hardware Discovery 7. Part 2: Configuring and Modifying Linux Systems
8. Chapter 6: Basic System Settings 9. Chapter 7: User and Group Management 10. Chapter 8: Software Installation and Package Repositories 11. Chapter 9: Network Configuration and Debugging 12. Chapter 10: Storage Management 13. Part 3: Linux as a Part of a Larger System
14. Chapter 11: Logging Configuration and Remote Logging 15. Chapter 12: Centralized Authentication 16. Chapter 13: High Availability 17. Chapter 14: Automation with Chef 18. Chapter 15: Security Guidelines and Best Practices 19. Index 20. Other Books You May Enjoy

Logging configuration

Linux uses the syslog system for logging. The syslog daemon collects messages from different parts of the system and writes them to log files. The syslog configuration file is usually located at /etc/syslog.conf or /etc/rsyslog.conf, depending on the distribution. This file contains the rules that specify which messages to log and where to store them.

There is a critical parameter called facility.severity that is a crucial part of the logging configuration in Linux. It allows you to control which log messages should be recorded and where they should be stored. The facility and severity can be specified either numerically or using their symbolic names. For example, the following rule logs all messages with a severity level of warning or higher from the auth facility to the /var/log/auth.log file:

auth.warning /var/log/auth.log

The target part of the configuration file specifies where to store the logged messages. The target can be a file, a remote host...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime