This project is read-only.
  1. Configuration
  2. Main
  3. FileWatcher
  4. Testing tools
  5. External program

Configuration

Parsing

configuration.jpg

This is the main section where user decide how log will be parsed.
A bit portion of regex knowledge is required, although there are some samples below that will hopefully give an help.

UNDER THE HOOD

It's important to know that for every line of a the log file is applied the regex match for the beginning of the line pattern.
If match check result positive, date and level pattern are also matched, and eventually parsed.
If don't, current line will be considered as a part of the current log entry message.

Configuration HOW TO - some examples -

Here's a pseudo line generated by a logging software.

Oct 20 11:18:53 10.255.0.117 DEMO_PROJECT CLASS [DEBUG]: 15 => message log is here

Solution:
It is clear that the log line above begins with a date in a short month form followed by a date time in a dd hh:mm:ss format.
Therefore, a regex that satisfy this assertion would be:

^\w* \d{2} \d{2}:\d{2}:\d{2}

While the regex for the datetime it's just the same, it's obvious that log level matching need a different regex.
The main purpose is to catch a string like DEBUG, INFO, ERROR etc. , so Regex pattern would be:

INFO|DEBUG|ERROR|FATAL|WARN

This might be enough, but not even safe.
For instance, think about a log that shows first the name of the class and later the log level.
Imagine a class in this project called just INFO.
The log produced might be

Oct 20 11:18:53 10.255.0.117 DEMO_PROJECT INFO [DEBUG]: 15 => message log is here

which is the correct log level, INFO or DEBUG?

Rendering the regex pattern in a more accurate way can solve this issue:

\[(INFO|DEBUG|ERROR|FATAL|WARN)\]:.*=>

The correct level is inside the parenthesis, and right before => characters

Notice:
Make sure the log level matches the exact name (i.e. INFO, DEBUG) without any characters at the bounds of the word.

Entity Viewer

main.jpg

The Entity Viewer frame:
On the right side log entries are displayed in a table data.
On the left side there's the filter panel.
It is possible to apply many filter like text, level , date interval and source file.
On the bottom side is shown the message of the selected log entry.


File Watcher

FileWatcher.jpg

This is the File Watcher page.
It is possibile to tail and monitor a local or remote file via http protocol.
On the settings page, under File Watcher section it is possible to define proxy, credentials and content size limit for each file's change.


Testing tools

testing_tools.jpg

With this tool is possible to do some test to make easier the configuration process.

Regex

This section allows to train up with regex.
There are two Input text, one where typing pattern and data to match and a result box in the middle.
It is also possible to open some file's content, but only first 50 lines will be displayed.

Date

This section help setting your date format's configuration properly.
There's an input text for setting dateformat and one for the input date.
A listbox of the most used dateformat will help to set right values.
A result date will be shown if parsed correctly, otherwise an error message will appear.

External program

external.jpg

Associate an external program with Modern Log Viewer.

Use the CONTEXT ARGUMENTS to compose the command argument's executable.

For instance, let's assume to open the selected log entry file with notepad++.

Just click on Browse button and locate notepad++.exe

Now type under COMMAND LINE ARGUMENT :

%f -n%n

Selecting "Open with external program" will now open the selected log entry file at selected line (see image below)

home_2.jpg

Last edited Apr 27, 2015 at 1:26 PM by Zenon66, version 17