- CONFIGURATION AND ENVIRONMENT
- BUGS AND LIMITATIONS
- LICENSE AND COPYRIGHT
Log::Deep::Read - Read and prettily display log files generated by Log::Deep
This documentation refers to Log::Deep::Read version 0.3.5.
use Log::Deep::Read; # Brief but working code example(s) here showing the most common usage(s) # This section will be as far as many users bother reading, so make it as # educational and exemplary as possible.
Provides the functionality to read and analyse log files written by Log::Deep
new ( %args )
mono - bool - Display out put in mono ie don't use colour
follow - bool - Follow the log files for any new additions
number - int - The number of lines to display from the end of the log file
session-number - int - The number of sessions to display from the end of the file
display - hash ref - keys are the keys of the log's data to display if a true value (or hide if false). The values can also be a comma separated list (or an array reference) to turn on displaying of sub keys of the field (requires the filed to be a hash)
filter - hash ref - specifies the keys to filter (not yet implemented)
verbose - bool - Turn on showing more verbose log messages.
short_break - bool - Turn on showing a short break when some time has passed between displaying log lines (when follow is true)
short_lines - int - the number lines to print out when a short time threshold has been exceeded.
long_break - bool - Turn on showing a short break when a longer time has passed between displaying log lines (when follow is true)
long_lines - int - the number lines to print out when a longer time threshold has been exceeded.
sessions_max - int - The maximum number of sessions to keep before starting to remove older sessions
Return: Log::Deep::Read - A new Log::Deep::Read object
Description: Sets up a Log::Deep::Read object to play with.
read_files ( @files )
@files - List of strings - A list of files to be read
Description: Reads and parses all the log files specified
read_file ( $file, $fh )
$file - string - The name of the file to read
$fh - File Handle - A (possibly) previously open file handle to $file.
Return: File Handle - The opened file handle
Description: Reads through the lines of $file
changed_file ( $file )
$file - hash ref - The file currently being examined
Description: Prints a message to the user that the current log file has changed to a new file. The format is the same as for the tail command.
Return: Log::Deep::Line - The next line read or undef if no more lines in file
Description: Just parses the next line in the log file (skips blank lines and lines that are filtered out)
session_colour ( $session_id )
Params: The session id that is to be coloured
Description: Colours session based on their ID's
CONFIGURATION AND ENVIRONMENT
BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to Ivan Wills (firstname.lastname@example.org).
Patches are welcome.
Ivan Wills - (email@example.com)
LICENSE AND COPYRIGHT
Copyright (c) 2009 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW 2077). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.