Changes between Version 19 and Version 20 of LogViewerPlugin


Ignore:
Timestamp:
Mar 7, 2015, 12:10:40 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • LogViewerPlugin

    v19 v20  
    11[[PageOutline(2-5,Contents,pullout)]]
    2 = View the trac.log file via the web frontend =
    32
    4 == Description ==
     3= View the trac.log file via the web frontend
     4
     5== Description
    56
    67This plugin allows you to view your `trac.log` logfile without shell access to the server, just via the Web-UI Admin interface. You can select to only display messages from a specified log level (e.g. only warnings), optionally including higher levels. So if you select "Debug" and all higher levels, this means to display the entire log. Moreover, you may restrict the output to the latest N lines, and even filter for lines containing a specified string or even matching a regular expression.
    78
    8 Be careful with large log files ;)
     9Be careful with large log files: use the tail-function to limit the output, which would otherwise take a very long time to display.
    910
    10 == Bugs/Feature Requests ==
     11== Bugs/Feature Requests
    1112
    1213Existing bugs and feature requests for LogViewerPlugin are
     
    1617[http://trac-hacks.org/newticket?component=LogViewerPlugin&owner=izzy new ticket].
    1718
    18 == Download ==
     19[[TicketQuery(component=LogViewerPlugin,group=type,format=progress)]]
     20
     21== Download
    1922
    2023Download the zipped source from [download:logviewerplugin here] (development version). You can also download the [attachment:LogViewerPlugin-0.2-py2.5.egg Python Egg] of the latest release from this page.
    2124
    22 == Source ==
     25== Source
    2326
    2427You can check out LogViewerPlugin from [http://trac-hacks.org/svn/logviewerplugin here] using Subversion, or [source:logviewerplugin browse the source] with Trac.
    2528
    26 == Installation ==
     29== Installation
     30
    2731The easiest way to install this plugin is:
    2832{{{
     
    3438}}}
    3539
    36 If you want to be very sure to get stable code, you can alternatively use the latest tag, replacing `/trunk` by e.g. `/tags/0.2` (for v0.2). You can also checkout the code from the repository, or download and unpack the zipped source (see above) - and then run either `easy_install` or `python setup.py` from where the `setup.py` file resides.
     40If you want to be sure to get stable code, you can alternatively use the latest tag, replacing `/trunk` by e.g. `/tags/0.2` (for v0.2). You can also checkout the code from the repository, or download and unpack the zipped source (see above) - and then run either `easy_install` or `python setup.py` from where the `setup.py` file resides.
    3741
    38 Moreover, you will need to enable the plugin for your trac environment(s):
     42Moreover, you will need to enable the plugin for your Trac environment(s):
    3943{{{
     44#!ini
    4045[components]
    4146logviewer.* = enabled
    4247}}}
    4348
    44 There's no more configuration required.
     49== Configuration
    4550
    46 == Configuration ==
    47 No - no kidding. I said there's no more configuration ''required'' - however, it is ''possible''. If you want the LogViewerPlugin to immediately load and show content from your log file without the need to first (fill some form and) push the button, you can do so. With the IniAdminPlugin installed, just call up the ''logviewer'' section, and it will explain you the details. For everybody else, the details are here:
     51If you want the LogViewerPlugin to immediately load and show content from your log file without the need to first (fill some form and) push the button, you can do so. With the IniAdminPlugin installed, just call up the ''logviewer'' section, and it will explain you the details. For everybody else, the details are here:
    4852
    4953You need to introduce a new section to your `trac.ini` file. Using the default settings, it would look like this:
    5054{{{
     55#!ini
    5156[logviewer]
    5257autoload = false
     
    5661}}}
    5762
    58 So what do those settings mean? Quite clear: `autoload` decides whether you want to turn this feature on (`true`) or not. By default, it is turned off. All the other `auto*` settings only apply if you set `autoload = true`.
     63 `autoload`:: Decides whether you want to turn this feature on (`true`) or not. By default, it is turned off. All the other `auto*` settings only apply if you set `autoload = true`.
    5964
    60 With the `autotail` setting you limit LogViewerPlugin to those many lines from the end of the file. Normally, 1000 lines will be enough - but if you want to show everything, simply set it to an empty value (as shown below for `defaulttail`). Keep in mind that with a huge log file, the page will take some time to load - every time you call up LogViewerPlugin. So better keep this value to something reasonable, and do the unusual full display on demand only.
     65 `autotail`:: Limit LogViewerPlugin to those many lines from the end of the file. Normally, 1000 lines will be enough - but if you want to show everything, simply set it to an empty value (as shown below for `defaulttail`). Keep in mind that a large log file will take some time to display. So keep this value to something reasonable, and do the unusual full display on demand only.
    6166
    62 `autolevel` specifies the log level to display, and `autoup` decides whether higher priority levels (i.e. those with lower numbers) shall be included. Note that this is a numeric value (integer, to be more precise) - and reaches from 1=critical to 5=debug (including 2=error, and 4=info), with a default of 3=warning.
     67 `autolevel`:: Specifies the log level to display, and `autoup` decides whether higher priority levels, ie those with lower numbers, shall be included:
     68  * 1 = critical
     69  * 2 = error
     70  * 3 = warning (default)
     71  * 4 = info
     72  * 5 = debug
    6373
    64 If you are not happy with the default presets of the form fields - you can change them for some of the fields:
     74If you are not happy with the default presets of the form fields, you can change them for some of the fields:
     75
    6576{{{
     77#!ini
    6678[logviewer]
    6779defaultlevel = 3
     
    6981defaulttail =
    7082}}}
     83
    7184The meaning of those three settings corresponds to the similarly named items from the autoload - with the difference that the values here only apply when autoload is disabled.
    7285
    73 == Usage ==
     86== Usage
     87
    7488You find the ''Log Viewer'' on the ''Admin'' page in the ''General'' section (see [#Example below]). Having this page called, you select the log level you wish to see the entries for, using the drop-down. Optionally, you may chose to display all "higher priority" as well (where "higher" means the entries on top of the one you selected).
    7589
    7690Optionally, you now can further restrict the amount of lines displayed: The ''Tail'' input works similar to the `tail -f` command, only showing the last N lines. If you input nothing here, this restriction is skipped - but if you do, the following search will be limited to these lines. In the ''Search'' input box you can enter a term which must be found in a line to be displayed. You can also use regular expressions here, in which case you must check the corresponding button. If you additionally check the "not" button, that search will be inverted - i.e. only lines ''not'' containing/matching your search term will be shown.
    7791
    78 Oh, btw: hovering your mouse over the input areas will give you a short tooltip, in case you forgot these meanings ;)
     92Hovering your mouse over the input areas will give you a short tooltip with the meanings.
    7993
    8094Once you made your selections, push the button - and the matching lines from the `trac.log` will be displayed.
    8195
    82 == Example ==
     96== Example
    8397
    84 Hell, what example? OK: Here is what it may look like, having selected "Info and above":
     98Here is what it may look like, having selected "Info and above":
    8599
    86100[[Image(logviewer.jpg)]]
     
    88102As you can see, the log lines are quite colorful: each log level has its distinct color assigned. If you don't like my choice of colors here, you can easily apply your own style sheets. All elements can be identified without problems: the different log levels use classes, and even the other elements of the GUI use classes and ids. Furthermore, in this example you might note that obviously nothing was logged at "Info" level - nevermind, it works.
    89103
    90 == User Comments ==
     104== User Comments
     105
    91106 * Your feedback here, please :-) Or if you don't want to write something yourself, use the poll below (you must be logged in to vote):
    92107  * olemis: This plugin is cool and very useful (especially to manage remote Trac instances ''';o)'''.
     
    95110[[Poll(Let others know what you think about the LogViewerPlugin:;I use it and I like it!;I use it and find it acceptable.;I tried it and didn't like it;I think it's great stuff and will give it a try!;I don't know what to think about it.)]]
    96111
    97 == Recent Changes ==
     112== Recent Changes
    98113
    99114[[ChangeLog(logviewerplugin, 3)]]
    100115
    101 == Author/Contributors ==
     116== Author/Contributors
    102117
    103118'''Author:''' [wiki:izzy] [[BR]]
    104 '''Maintainer:''' [wiki:izzy] [[BR]]
     119'''Maintainer:''' [[Maintainer]] [[BR]]
    105120'''Contributors:'''