As an alternative to the aforementioned command-line utilities, Red Hat Enterprise Linux 7 provides an accessible GUI for managing log messages.
22.11.1. Viewing Log Files
Most log files are stored in plain text format. You can view them with any text editor such as Vi or Emacs. Some log files are readable by all users on the system; however, root privileges are required to read most log files.
To view system log files in an interactive, real-time application, use the System Log.
In order to use the System Log, first ensure the gnome-system-log package is installed on your system by running, as root:
~]# yum install gnome-system-log
After you have installed the gnome-system-log package, open the System Log by clicking → → , or type the following command at a shell prompt:
~]$ gnome-system-log
The application only displays log files that exist; thus, the list might differ from the one shown in
Figure 22.2, “System Log”.
The System Log application lets you filter any existing log file. Click on the button marked with the gear symbol to view the menu, select → to define or edit the desired filter.
When defining a filter, the following parameters can be edited:
When you have at least one filter defined, it can be selected from the Filters menu and it will automatically search for the strings you have defined in the filter and highlight or hide every successful match in the log file you are currently viewing.
When you select the Show matches only option, only the matched strings will be shown in the log file you are currently viewing.
22.11.2. Adding a Log File
To add a log file you want to view in the list, select → . This will display the
Open Log window where you can select the directory and file name of the log file you want to view.
Figure 22.6, “System Log - adding a log file” illustrates the window.
Click on the Open button to open the file. The file is immediately added to the viewing list where you can select it and view its contents.
The System Log also allows you to open log files zipped in the .gz format.
22.11.3. Monitoring Log Files
System Log monitors all opened logs by default. If a new line is added to a monitored log file, the log name appears in bold in the log list. If the log file is selected or displayed, the new lines appear in bold at the bottom of the log file.
Figure 22.7, “System Log - new log alert” illustrates a new alert in the
cron log file and in the
messages log file. Clicking on the log file displays the logs in the file with the new lines in bold.
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.