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## Keyboard commands 67 68_glogg_ keyboard commands try to approximatively emulate the default bindings 69used by the classic Unix utilities _vi_ and _less_. 70 71The main commands are: 72<table> 73<tr><td>arrows</td> 74 <td>scroll one line up/down or one column left/right</td></tr> 75<tr><td>[number] j/k</td> 76 <td>move the selection 'number' (or one) line down/up</td></tr> 77<tr><td>h/l</td> 78 <td>scroll left/right</td></tr> 79<tr><td>[number] g</td> 80 <td>jump to the line number given or the first one if no number is entered</td></tr> 81<tr><td>G</td> 82 <td>jump to the last line of the file (selecting it)</td></tr> 83<tr><td>/</td> 84 <td>start a quickfind search in the current screen</td></tr> 85<tr><td>n/N</td> 86 <td>repeat the previous quickfind search forward/backward</td></tr> 87<tr><td>f</td> 88 <td>active 'follow' mode, which keep the display as the tail of the file (like "tail -f")</td></tr> 89</table> 90