Using a Log Viewer to View Application Log Files
|
Posted On :
Nov-10-2014
| seen (516) times |
Article Word Count :
838
|
|
When most people view an application log file they use a text editor (or Tail and Grep). In this article, we look at a better way to view a log file - a log file viewer. Using a log viewer can simplify log analysis and increase productivity.
|
If you work in software development or support you are no stranger to application log files. If you are like most people, you probably look at an application log file at least once a day. When most people view a log file they do so using a text editor, or a command line program such as tail and grep. In this article we are going to look at a better way to view an application log file - a log file viewer.
A log viewer is any application that is designed specifically for viewing a log file. A log viewer will generally contain features to help with management, analysis and monitoring of log files. In this example, were going to be using Log Viewer Plus to view our log files.
Log Parsing
Regardless of which log file viewer you choose, you're going to need to tell it how to parse your log file. Parsing is the act of turning text into data and it is this process which allows your log file viewer to analyse your log files.
In order to tell Log Viewer Plus how to parse our log file, we need to give it a conversion pattern. The conversion pattern is a simple string that will tell Log Viewer Plus about the format of your log files. If you've used log4j, log4net or log4php in the past than you are probably already familiar with conversion patterns. The log4x utilities use conversion patterns to specify the output of log entry.
Log Management
Managing log files can sometimes be a pain. When in development, they frequently need to be deleted between runs of the application. It is important to not let previous log entries confuse the current debugging session. Also if you are working with a large application that has multiple log files can be difficult to keep track of which log files are in which directory.
A log file GUI can help with both of these log management tasks. Log Viewer Plus for example can delete directories or individual log files. If more power is needed you can run a batch file without leaving the program. Additionally Log Viewer Plus remembers recent log file directories and allows you to easily access those directories. This simple feature can go a long way toward helping you manage your log files.
Log Analysis
Log analysis is the meat of any application log viewer. Ultimately the purpose of the log file viewer is to help you analyse your log files.
If you are used to using a text editor to view your log files, you probably use the search function a lot. You search for errors, you search for exceptions, you search for warnings - search is essentially your only tool to analyse log file.
Log viewers take a different approach. Log Viewer Plus for example uses the concept of a filter. The filter is like a search except that you can chain filters. This is kind of like searching on your search results.
Additionally, Log Viewer Plus has basic filters built-in. For example, things like finding errors and warnings are so common that these actions are push button simple. For example, a single command can analyse your log file and show you all errors.
Log Monitoring
Another great reason to use a log file viewer is that it can help you monitor your log files. Monitoring your log files is important when you are looking at a ?live? log file. A ?live? log file is one that is currently in written to by your application.
A lot of people have used tail to achieve this functionality. Unfortunately, tail is not natively supported in Windows. Additionally, most text editors do not support this feature. Those that do, profiting massively inefficient and required you to reload the entire log file. This may be less of an issue for small log files, but would become more of an issue as your log file grew.
Log Viewer Plus allows you to monitor your log file in real-time. It does this by reading from the bottom of your log file and appending any new entries into your view. This functionality is similar to tail, but note that all log entries are parsed, analysed and filtered as they are being read.
Conclusion
If you're using a text editor to view log files, you're probably wasting time. More powerful applications are available. Consider using a text editor when you want to edit text and a long viewer when you want to view a log file.
Most log viewers help you with log parsing, log management, log analysis, and log monitoring. They can, of course, do much more, but this is the basic set of functionality that you should be looking at when you compare application log viewers.
|
|
Article Source :
http://www.articleseen.com/Article_Using a Log Viewer to View Application Log Files_306922.aspx
|
Author Resource :
Toby Patke is a software developer with over 20 years of experience. Far too much of those twenty years has been spent looking at log files in a text editor. So, he created Log Viewer Plus to try to help other people out.
|
Keywords :
Log Viewer, Log File Viewer, Log File GUI, Log File Windows, Log Management, Log Parser, Log Analysis, Log Monitor, Log File ,
Category :
Computers
:
Software
|
|
|