xref: /glogg/doc/documentation.markdown (revision db1ac0ecca70067e52ba8a937e8a96c1ea7be2ea)
1
2## Getting started
3
4_glogg_ can be started from the command line, optionally passing the file to
5open as an argument, or via the desktop environment's menu or file
6association.
7If no file name is passed, _glogg_ will initially open the last used file.
8
9The main window is divided in three parts : the top displays the log file. The
10bottom part, called the "filtered view", shows the results of the search. The
11line separating the two contains the regular expression used as a filter.
12
13Entering a new regular expression, or a simple search term, will update the
14bottom view, displaying the results of the search. The lines matching the
15search criteria are listed in order in the results, and are marked with a red
16circle in both windows.
17
18## Exploring log files
19
20Regular expressions are a powerful way to extract the information you are
21interested in from the log file. _glogg_ uses _extended regular expressions_.
22
23One of the most useful regexp feature when exploring logs is the
24_alternation_, using parentheses and the | operator. It searches for several
25alternatives, permitting to display several line types in the filtered window,
26in the same order they appear in the log file.
27
28For example, to check that every connection opened is also closed, one can use
29an expression similar to:
30
31`Entering (Open|Close)Connection`
32
33Any 'open' call without a matching 'close' will immediately be obvious in the
34filtered window.
35The alternation also works with the whole search line. For example if you also
36want to know what kind of connection has been opened:
37
38`Entering (Open|Close)Connection|Created a .* connection`
39
40`.*` will match any sequence of character on a single line, but _glogg_ will only
41display lines with a space and the word `connection` somewhere after `Created a`
42
43## Using filters
44
45_Filters_ can colorize some lines of the log being displayed, for example to
46draw attention to lines indicating an error, or to associate a color with each
47sort of event. Any number of filter can be defined in the 'Filters'
48configuration dialog, each using a regexp against which lines will be matched.
49For each line, all filters are tried in order and the fore and back colors of
50the first successful filter are applied.
51
52## Browsing changing log files
53
54_glogg_ can display and search through logs while they are written to disk, as
55it might be the case when debugging a running program or server.
56The log is automatically updated when it grows, but the search must be
57manually restarted for the new matches to be found.
58
59## Settings
60### Font
61
62The font used to display the log file. A clear, monospace font (like the free,
63open source, [DejaVu Mono](http://www.dejavu-fonts.org/) for example) is
64recommended.
65
66
67