Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Log::Delimited 0.90

    Download button

    No screenshots available
    Downloads: 398  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Earl Cahill | More programs
    Perl Artistic License / FREE
    November 2nd, 2006, 09:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    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 -w

    use strict; use Log::Delimited;

    my $log = Log::Delimited->new({ log_cols => ['url', 'step', 'elapsed'], log_info => ['http://slap.com/cgi-bin/slow_script', 'step 1', '99993.0923'], })->log;

    $log->{log_info} = ['http://slap.com/cgi-bin/slow_script', 'step 2', '8.3240']; $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 this

    this|that|else

    my_hostname|12342|1000204952|rulz|rocksrocks!|do+something

    the 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



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    log results | log help | Perl module | Log::Delimited | log | results

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM