a syslog data viewer for the web
Aug 01, 2010 - 02:48 AM
Professional Services
Custom phpLogCon configuration? Maintenance Contract?

phpLogCon professional services


Online
There are 6 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Using text log files with phpLogCon

PhpLogcon natively supports operting on text log files. So there is no need to put log data into databases. Each approach has advantages and disadvantages, which we will not discuss in this paper. Here, we focus on how text log files are supported.

We assume that the reader is familiar with basic phpLogCon concepts. If you are not, get aquainted to them, first.

Requirements for text log files

PhpLogCon can operate on any standard text log file, that means a file that purely consists of printable characters and uses LF (linefeed, newline) characters as log line terminators. Most importantly, this includes standard syslog files as well as web server and other application logs.

A data source is defined to pull data from a text log file. Note that only a single text log file can be contained in any data source.

Working with text log files

Text log files are just regular data sources. You can work with them like with any other data sources, for example, you can browse them, search them, generate graphics from the or base reports on their content. Depending on the size of the text log and on the operation being performed, performance may be worse or even better than with using database-based data sources. For typical operations and typical text file sizes, performance should be quite well.

Note that some options make limited sense when working with text log files. For example, you may set a filter with a broad date range, but the text log file will, for obvious reasons, only provide what is currently contained in it. For typical syslog files, that will probably mean they contain maximum one day's data.

Use Cases for Text Log Files

A typical use case is in a hosting environment. There, phpLogCon may be used to do an online review of log data, via the web and without the need to log into an SSH session. This can be very handy to learn what is currently going on or, for example, to verify if an important mail left your system.

Another use case is that you would like to keep an eye on some local text files, for example while debugging an installation. Instead of reconfiguring your whole logging system, you can set up a phpLogCon instance and point it to the log files in question. Keep in mind that you are not restricted to syslog files. For example, you may want to add additional application text log files as data sources as well. With the cross-datasource search capability, you can quickly follow events across the boundaries of log servers.

For secuity sensitive-environments, the access to phpLogCon can be protected by several levels, e.g. user authentication or IP ranges at the firewall or http server level. Also, one may consider to activate a phpLogCon instance only when actually needed to do troubleshooting and keep it "turned off" at other times. The beauty of text log files is that you do not need to reconfigure the whole logging system to do so. All that is needed is to disable the web site inside the http server.

Working with dynamic filenames

Since Version 2.7.0, phpLogCon supports dynamic filenames. The following replacement characters can be used:

  • %y = Year with two digits (e.g. 2002 becomes "02")
  • %Y = Year with 4 digits
  • %m = with two digits (e.g. March becomes "03")
  • %M = Minute with two digits
  • %d = Day of month with two digits (e.g. March, 1st becomes "01")
  • %h = Hour as two digits
  • %S = Seconds as two digits. It is hardly believed that this ever be used in reality.
  • %w = Weekday as one digit. 0 means Sunday, 1 Monday and so on.
  • %W = Weekday as three-character string. Possible values are "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat".
A common file created by WinSyslog would be configured like this: WinSyslog-%Y-%m-%d.log

[manual index] [phpLogCon site]

This documentation is part of the phpLogCon project.
Copyright © 2008 by Adiscon. Released under the GNU GPL version 3 or higher.


:: Syndication: ::
Page created in 0.115620851517 seconds.