Product SiteDocumentation Site

18.12. Managing Log Files in a Graphical Environment

As an alternative to the aforementioned command-line utilities, Red Hat Enterprise Linux 7 provides an accessible GUI for managing log messages.

18.12.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.

Installing the gnome-system-log package

In order to use the System Log, first ensure the gnome-system-log package is installed on your system by running, as root:
~]# dnf install gnome-system-log
For more information on installing packages with DNF, see Section 6.2.4, “Installing Packages”.
After you have installed the gnome-system-log package, open the System Log by clicking ApplicationsSystem ToolsSystem Log, 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 18.2, “System Log”.
System Log
System Log
Figure 18.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 FiltersManage Filters to define or edit the desired filter.
System Log - Filters
System Log - Filters
Figure 18.3. System Log - Filters

Adding or editing a filter lets you define its parameters as is shown in Figure 18.4, “System Log - defining a filter”.
System Log - defining a filter
System Log - Defining a Filter
Figure 18.4. System Log - defining a filter

When defining a filter, the following parameters can be edited:
  • Name — Specifies the name of the filter.
  • Regular Expression — Specifies the regular expression that will be applied to the log file and will attempt to match any possible strings of text in it.
  • Effect
    • Highlight — If checked, the found results will be highlighted with the selected color. You may select whether to highlight the background or the foreground of the text.
    • Hide — If checked, the found results will be hidden from the log file you are viewing.
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.
System Log - enabling a filter
System Log - Enabling a Filter
Figure 18.5. System Log - enabling a filter

When you select the Show matches only option, only the matched strings will be shown in the log file you are currently viewing.