Changeset 71b41918e7074bbc7a6c4c165197e3709e7a086b in xas-logmon


Ignore:
Timestamp:
12/01/15 14:09:33 (4 years ago)
Author:
Kevin L. Esteb <kevin@…>
Branches:
master
Children:
52b14bfceeabb92e6d2a03879651580694b196d4
Parents:
8496bdb0739806df787c8be0b3c66756ab4a6efa
git-author:
Kevin L. Esteb <kevin@…> (12/01/15 14:09:33)
git-committer:
Kevin L. Esteb <kevin@…> (12/01/15 14:09:33)
Message:

Updated formatting

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/XAS/Apps/Logmon/Monitor.pm

    r8496bdb0739806df787c8be0b3c66756ab4a6efa r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    5555            -directory      => Dir($self->cfg->val($section, 'directory', "/")), 
    5656            -exit_codes     => $self->cfg->val($section, 'exit-codes', '0,1'), 
     57            -exit_retries   => $self->cfg->val($section, 'exit-retires', -1), 
    5758            -group          => $self->cfg->val($section, 'group', 'xas'), 
    5859            -priority       => $self->cfg->val($section, 'priority', '0'), 
  • trunk/lib/XAS/Apps/Logmon/XAS/Process.pm

    r8496bdb0739806df787c8be0b3c66756ab4a6efa r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    3434    ); 
    3535 
    36     return 1 if ($span->contains($data->{datetime})); 
     36    return 1 if ($span->contains($data->{'datetime'})); 
    3737 
    3838    return 0; 
     
    4343    my $self = shift; 
    4444 
    45     unless (defined($self->{filename})) { 
     45    unless (defined($self->{'filename'})) { 
    4646 
    4747        $self->throw_msg( 
  • trunk/lib/XAS/Logmon/Filter/Merge.pm

    r57ab731dbfc619ab99ce71ac415210d451fc3ba0 r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    3535    my $self = shift; 
    3636 
    37     $self->{hm} = Hash::Merge->new('RIGHT_PRECEDENT'); 
     37    $self->{'hm'} = Hash::Merge->new('RIGHT_PRECEDENT'); 
    3838 
    3939    return $self; 
  • trunk/lib/XAS/Logmon/Format/Logstash.pm

    r57ab731dbfc619ab99ce71ac415210d451fc3ba0 r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    8585    my $self = $class->SUPER::init(@_); 
    8686 
    87     $self->{hm} = Hash::Merge->new('RIGHT_PRECEDENT'); 
     87    $self->{'hm'} = Hash::Merge->new('RIGHT_PRECEDENT'); 
    8888 
    8989    return $self; 
  • trunk/lib/XAS/Logmon/Input/Tail.pm

    ref8b410a1c69084e675a8a870c49305c92afd8d1 r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    4949    while (my $line = $fh->getline()) { 
    5050 
    51         push(@{$self->{buffer}}, $line); 
     51        push(@{$self->{'buffer'}}, $line); 
    5252 
    5353    } 
     
    8181        } 
    8282 
    83         if (($stat[0] eq $state->{device}) and 
    84             ($stat[1] eq $state->{inode})) { 
     83        if (($stat[0] eq $state->{'device'}) and 
     84            ($stat[1] eq $state->{'inode'})) { 
    8585 
    86             $pos = $state->{position}; 
     86            $pos = $state->{'position'}; 
    8787 
    8888        } 
     
    118118    my $self = $class->SUPER::init(@_); 
    119119 
    120     $self->{buffer} = []; 
    121     $self->{statefile} = File($self->filename->directory, '.' . $self->filename->name . '.logmon'); 
     120    $self->{'buffer'} = []; 
     121    $self->{'statefile'} = File($self->filename->volume, $self->filename->directory, '.' . $self->filename->basename . '.logmon'); 
    122122 
    123123    $self->init_notifier(); 
  • trunk/lib/XAS/Logmon/Input/Tail/Default.pm

    r57ab731dbfc619ab99ce71ac415210d451fc3ba0 r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    1919    my $self = shift; 
    2020 
    21     if (scalar(@{$self->{buffer}})){ 
     21    if (scalar(@{$self->{'buffer'}})){ 
    2222 
    23         return shift @{$self->{buffer}}; 
     23        return shift @{$self->{'buffer'}}; 
    2424 
    2525    } else { 
     
    3636                $self->_do_tail(); 
    3737 
    38                 if (scalar(@{$self->{buffer}})) { 
     38                if (scalar(@{$self->{'buffer'}})) { 
    3939 
    40                     return shift @{$self->{buffer}}; 
     40                    return shift @{$self->{'buffer'}}; 
    4141  
    4242                } 
  • trunk/lib/XAS/Logmon/Input/Tail/Linux.pm

    ref8b410a1c69084e675a8a870c49305c92afd8d1 r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    2626    my $self = shift; 
    2727 
    28     if (scalar(@{$self->{buffer}})){ 
     28    if (scalar(@{$self->{'buffer'}})){ 
    2929 
    3030        $self->log->debug('processing...'); 
    3131 
    32         return shift @{$self->{buffer}}; 
     32        return shift @{$self->{'buffer'}}; 
    3333 
    3434    } else { 
     
    4747            if ($self->_in_modify) { 
    4848 
    49                 if (scalar(@{$self->{buffer}})) { 
    50  
    51                     return shift @{$self->{buffer}}; 
     49                if (scalar(@{$self->{'buffer'}})) { 
     50 
     51                    return shift @{$self->{'buffer'}}; 
    5252  
    5353                } 
     
    7171    $self->_in_create(0); 
    7272 
    73     $self->{notifier} = Linux::Inotify2->new() or 
     73    $self->{'notifier'} = Linux::Inotify2->new() or 
    7474        $self->throw_msg( 
    7575            dotid($self->class) . '.inotify', 
  • trunk/lib/XAS/Logmon/Input/Tail/Win32.pm

    r57ab731dbfc619ab99ce71ac415210d451fc3ba0 r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    2222    my $self = shift; 
    2323 
    24     if (scalar(@{$self->{buffer}})){ 
     24    if (scalar(@{$self->{'buffer'}})){ 
    2525 
    2626        $self->log->debug('processing...'); 
    2727 
    28         return shift @{$self->{buffer}}; 
     28        return shift @{$self->{'buffer'}}; 
    2929 
    3030    } else { 
     
    4949                $self->_do_tail(); 
    5050 
    51                 if (scalar(@{$self->{buffer}})) { 
     51                if (scalar(@{$self->{'buffer'}})) { 
    5252 
    53                     return shift @{$self->{buffer}}; 
     53                    return shift @{$self->{'buffer'}}; 
    5454 
    5555                } 
     
    101101    } 
    102102 
    103     $self->{notifier} = $notifier; 
     103    $self->{'notifier'} = $notifier; 
    104104    $self->notifier->reset; 
    105105 
  • trunk/lib/XAS/Logmon/Parser/XAS/Logs.pm

    r57ab731dbfc619ab99ce71ac415210d451fc3ba0 r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    3030    if ((@data{@$fields}) = ($line =~ /$regex/)) { 
    3131 
    32         $data{message} = trim($data{message}); 
    33         $data{type}    = 'xas-logs'; 
     32        $data{'message'} = trim($data{'message'}); 
     33        $data{'type'}    = 'xas-logs'; 
    3434 
    3535        return \%data; 
     
    6161    my @fields = $reg->capture; 
    6262 
    63     $self->{regex}  = $reg->regexp; 
    64     $self->{fields} = \@fields; 
     63    $self->{'regex'}  = $reg->regexp; 
     64    $self->{'fields'} = \@fields; 
    6565 
    6666    return $self; 
  • trunk/sbin/xas-logmon

    r8496bdb0739806df787c8be0b3c66756ab4a6efa r71b41918e7074bbc7a6c4c165197e3709e7a086b  
    130130This needs to be a comma delimited string. 
    131131 
     132=item B<exit-retries> 
     133 
     134The number of retries to try before giving up. Defaults to -1. This means to  
     135continually retry. 
     136 
    132137=item B<group> 
    133138 
Note: See TracChangeset for help on using the changeset viewer.