Log::Deep::Line - Encapsulates one line from a log file


Log-Deep documentation  | view source Contained in the Log-Deep distribution.

Index


NAME

Top

Log::Deep::Line - Encapsulates one line from a log file

VERSION

Top

This documentation refers to Log::Deep::Line version 0.3.1.

SYNOPSIS

Top

   use Log::Deep::Line;

   # create a new line object
   my $line = Log::Deep::Line->new( { show => {}, ... }, $line_text, $file );

DESCRIPTION

Top

SUBROUTINES/METHODS

Top

new ( $options, $line, $file )

Param: $options - hash ref - Configuration options for this line

Param: $line - string - The original text of the log line

Param: $file - Log::Deep::File - Object continuing the log file of interest

Return: Log::Deep::Line - New log deep object

Description: Create a new object from a line ($line) of the log file ($file)

parse ( $line, $file )

Param: $line - string - The original text of the log line

Param: $file - Log::Deep::File - Object continuing the log file of interest

Description: Parses the log line

id ( )

Return: The session id for this log line

Description: Gets the session id for the log line. Will be undef if the log line did not parse correctly.

colour ( [ $colour ] )

Param: $colour - string - A string containing the foreground and background colour to use for this line. The format is 'colour on_colour'.

Return: string - The colour set for this log line

Description: Gets the current colour for this log line and optionally sets the colour.

show ( )

Return: bool - True if the log line should be shown.

Description: Determines if the log line should be shown.

text ( )

Return: The processed text of the line (sans the DATA section).

Description: Processes log line for out putting to a terminal.

data ( )

Return: The contents of the DATA section as specified by the display option

Description: Out puts the DATA section of the log line.

data_missing ($field, $data)

Param: $field - string - The name of the field of data

Param: $data - any - All the data

Return: Array - all the lines to be out put

Description: Returns that there was no data or that the data was undefined

data_sub_fields ($field, $data)

Param: $field - string - The name of the field of data

Param: $data - any - The data being displayed

Return: Array - all the lines to be out put

Description: Shows only the sub keys of $data that are defined to be displayed

data_scalar ($field, $data)

Param: $field - string - The name of the field of data

Param: $data - any - The data being displayed

Return: Array - all the lines to be out put

Description: Just shows the simple data

DIAGNOSTICS

Top

CONFIGURATION AND ENVIRONMENT

Top

DEPENDENCIES

Top

INCOMPATIBILITIES

Top

BUGS AND LIMITATIONS

Top

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Top

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Top


Log-Deep documentation  | view source Contained in the Log-Deep distribution.