/[pdpsoft]/nl.nikhef.pdp.fetchcrl/trunk/FCLog.pm
ViewVC logotype

Diff of /nl.nikhef.pdp.fetchcrl/trunk/FCLog.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2652 by davidg, Tue Jul 2 19:16:38 2013 UTC revision 2690 by davidg, Tue Mar 4 16:26:06 2014 UTC
# Line 30  sub new { Line 30  sub new {
30    $obref->{"messagecache"} = ();    $obref->{"messagecache"} = ();
31    $obref->{"warnings"} = 1;    $obref->{"warnings"} = 1;
32    $obref->{"errors"} = 1;    $obref->{"errors"} = 1;
33      $obref->{"rcmode"} = 1;
34    $obref->{"warncount"} = 0;    $obref->{"warncount"} = 0;
35    $obref->{"errorcount"} = 0;    $obref->{"errorcount"} = 0;
36    $obref->{"syslogfacility"} = "daemon";    $obref->{"syslogfacility"} = "daemon";
# Line 125  sub seterrors { Line 126  sub seterrors {
126    return $oldlevel;    return $oldlevel;
127  }  }
128    
129    sub getrcmode {
130      my ($self) = @_;
131      return $self->{"rcmode"};
132    }
133    
134    sub setrcmode {
135      my ($self,$level) = @_;
136      my $oldlevel = $self->{"rcmode"};
137      $self->{"rcmode"} = $level;
138      return $oldlevel;
139    }
140    
141  sub verb($$$) {  sub verb($$$) {
142    my $self = shift;    my $self = shift;
143    my $level = shift;    my $level = shift;
# Line 160  sub err($@) { Line 173  sub err($@) {
173    $self->{"errorcount"}++;    $self->{"errorcount"}++;
174    return 1;    return 1;
175  }  }
176    
177    sub retr_err($@) {
178      my $self = shift;
179      my $message = "@_";
180      return 1 unless ( $self->{"errors"} );
181      $self->output("ERROR",$message);
182      return 1 unless ( $self->{"rcmode"} );
183      $self->{"errorcount"}++;
184      return 1;
185    }
186    
187  sub output($$@) {  sub output($$@) {
188    my ($self,$label,@message) = @_;    my ($self,$label,@message) = @_;

Legend:
Removed from v.2652  
changed lines
  Added in v.2690

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28