Log::Delimited

Log::Delimited is a simple module to help log results.
Download

Log::Delimited Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Earl Cahill
  • Publisher web site:
  • http://search.cpan.org/~earl/Log-Delimited-0.90/Delimited.pm

Log::Delimited Tags


Log::Delimited Description

Log::Delimited is a simple module to help log results. Log::Delimited is a simple module to help log results.SYNOPSIS#!/usr/bin/perl -wuse strict; use Log::Delimited;my $log = Log::Delimited->new({ log_cols => , log_info => , })->log;$log->{log_info} = ; $log->log;Log is sort of a dumb program that leads to sort of smart stuff. It takes some columns ('this', 'that', 'else'), some data ('rulz', 'rocks!', 'do something') and a delimiter ('|'), and makes a file that looks like thisthis|that|elsemy_hostname|12342|1000204952|rulz|rocksrocks!|do+somethingthe first row is a join($delimiter, @column_names), the second (in a little pseudo code) forms@data = ($hostname, $pid, time, $array_ref_of_your_passed_data)then forms the row with join($delimiter, URLEncode(@data)). By the way, you can turn off the hostname, pid and time inclusion, but in most applications, they have come in handy. To turn them off just set which applies from below $self->{no_hostname} = 1; $self->{no_pid} = 1; $self->{no_time} = 1;To turn off Url encoding, just set $self->{no_URLEncode} = 1;In this document, $self is a Log::Delimited object.The log directory is$self->{base_dir} = "/tmp/logs"; $self->{log_dir} ||= "$self->{base_dir}/$self->{log_node}";Log uses the last part of your script name ($0) for the log_node if you don't pass one.The log file is$self->{log_filename} ||= "$self->{log_dir}/$self->{log_name}";Log uses the last part of your script name ($0) for the log_name if you don't pass one.Since logs can get to be quite large, you can easily zip, by doing$self->zip;If you have a large log, where size is a bigger issue than speed you can do$self->log_zipped;which will result in just a zipped log file.Requirements:· Perl Requirements: · Perl


Log::Delimited Related Software