Skip to content

Commit

Permalink
fix handling of timestamps in log files
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert depesz Lubaczewski committed Aug 9, 2012
1 parent b0f3890 commit e6c1d75
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions doc/changes.pod
@@ -1,5 +1,15 @@
=head1 OmniPITR =head1 OmniPITR


=head2 2012-08-08

=over

=item * Fix log line parsing in omnipitr-monitor - the bug in there prevented
omnipitr-monitor from working when running on server with timezone "before" UTC
(for example UTC-0400).

=back

=head2 2012-07-02 =head2 2012-07-02


=over =over
Expand Down
2 changes: 1 addition & 1 deletion lib/OmniPITR/Program/Monitor.pm
Expand Up @@ -116,7 +116,7 @@ sub parse_line {
my $line = shift; my $line = shift;


my $epoch = $self->extract_epoch( $line ); my $epoch = $self->extract_epoch( $line );
$self->log->fatal( 'Cannot parse line: %s', $line ) unless $line =~ s/\A(.{26}) \+\d+ : (\d+) : omnipitr-(\S+) : //; $self->log->fatal( 'Cannot parse line: %s', $line ) unless $line =~ s/\A(.{26}) [+-]\d+ : (\d+) : omnipitr-(\S+) : //;
my $timestamp = $1; my $timestamp = $1;
my $pid = $2; my $pid = $2;
my $program_name = $3; my $program_name = $3;
Expand Down

0 comments on commit e6c1d75

Please sign in to comment.