Question: When debugging an issue on Ubuntu, I typically go to the command line to view the log file. Are there any GUI log file viewers available for Ubuntu?
Answer: Ubuntu comes with an inbuilt system log file viewer.
Launching System Log Viewer
Click on System -> Administration -> Log File Viewer, to launch the GUI log viewer tool.
The example below shows the auth.log file contents. This is a real time log file viewer. When you are viewing a log file, if there are any new log entries, they’ll be displayed immediately. The newer entries will be shown in bold as shown in the following example.
Fig: Ubuntu System Log Viewer
Updated Log Files will be shown in bold
When you are viewing a file, if there are newer entries available on other log files, they’ll be displayed in bold. In the following example, the current file we are viewing is user.log.0. However, the syslog file is in bold indicating that there is a newer log entry available in it.
Fig: Ubuntu System Log Viewer – with real time file updates
Adding Custom Log Files to the Viewer.
By default Ubuntu System Log Viewer shows all important system log files including the following:
However you can add your own custom log to this list. From the System Log Viewer, click on File -> Open -> Select the log file using file browser. In this example, we are selecting the /var/log/apache2/error.log.
Fig: Open a Custom Log File
Once you’ve added the custom log file, even after you close and open the System Log Viewer, it will be there. To remove a log file permanently from the System Log Viewer, select the log file -> Click on File -> Remove.
Fig: Custom Apache error_log added to Ubuntu System Log Viewer
Get the Linux Sysadmin Course Now!