Lemonolap::Log4lemon - Perl extension for Lemonolap framework


Lemonolap-Log4lemon documentation  | view source Contained in the Lemonolap-Log4lemon distribution.

Index


NAME

Top

    Lemonolap::Log4lemon - Perl extension for Lemonolap  framework




SYNOPSIS

Top

 use Lemonolap::Log4lemon;
 my $f =Lemonolap::Log4lemon->new('file' => "/tmp/lemonldap.log",);
 print $f->can_field,"\n";
 print $f->get_field_by_name(header => 1),"\n";
 $f->set_label('source' => 'adresse IP' );
 while ($l =$f->get_field_by_name(fields =>['time','date:aaaa','uid']) ) {
	print "$l\n" ; 
 }







DESCRIPTION

Top

This module is a logs formater . It parses lemonldap logs into flat file with separator .

The lemonldap framework is a web SSO server apache . This log is like :

 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\" %v"

 the %v (virtual host name ) at the end of line is the only difference with combined format apache log

Methods

Top

new->(file => /path_file) ;

 Path of log file . This file MUST exits . 

can_field () ;

 return the list of supported field  

get_field (header => 1, fields => [f1,F2..] );

 return  a string with fields or names of colomns (no both) .  
 If fields is ometted  , return a list like can_field




get_label (header => 1, fields => [f1,F2..] );

 Like get_field but uses symbolics names (labels) instead  names




set_label ( 'fieldname' => 'myname');

 Set symbolic name for field .

time and date

A parser MUST return date and time (format aaaammjj and hhmmss ) but you can get only aaaa or mm or dd by this syntax : date:aaaa date:mm date:dd

 and so for time : time:hh time:mm time:se




SEE ALSO

Top

Lemonldap http://lemonldap.sourceforge.net/

Lemonolap http://lemonolap.sourceforge.net/

Lemonolap::Formatelog

COPYRIGHT AND LICENSE

Top


Lemonolap-Log4lemon documentation  | view source Contained in the Lemonolap-Log4lemon distribution.