-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use $Logger in cronjobs #494
Changes from all commits
a467ec5
d31b007
80b2514
c9cfc7e
b462a4a
aa86c28
1c7fda5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ sub read_errorlog { | |
close LOG; | ||
report "\nErrorlog contains $errorlines lines today\n"; | ||
} else { | ||
warn "error opening $PAUSE::Config->{HTTP_ERRORLOG}: $!"; | ||
$Logger->log("error opening $PAUSE::Config->{HTTP_ERRORLOG}: $!"); | ||
} | ||
} | ||
|
||
|
@@ -241,7 +241,8 @@ sub watch_files { | |
quoteHighBit => 1, | ||
); | ||
my $v = $d->stringify($File::Find::name); | ||
warn sprintf qq{Found a bad directory v[%s], rmtree-ing}, $v; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unnecessary blank line? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most blanks are, right? :) Anyway, so much of the PAUSE code is without any vertical whitespace. Sometimes I add some to help break things up. This is maybe not the most obvious place to put it, but: I will continue to add vertical whitespace to create paragraphs of code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like vertical whitespace, this just felt like a weird place to put it. |
||
$Logger->log([ qq{Found a bad directory v[%s], rmtree-ing}, $v ]); | ||
require File::Path; | ||
File::Path::rmtree($File::Find::name); | ||
} | ||
|
@@ -649,7 +650,10 @@ sub mailrc { | |
require Text::Unidecode; | ||
$r[1] = Text::Unidecode::unidecode($r[1]); | ||
}; | ||
warn $@ if $@; | ||
|
||
if ($@) { | ||
$Logger->log([ "error unidecoding: %s", "$@" ]); | ||
} | ||
} | ||
$r[1] =~ s/["<>]//g; | ||
push @list, sprintf qq{alias %-10s "%s <%s>"\n}, @r[ 0 .. 2 ]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is an error, should it be fatal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the whole premise of this code is kinda wonky, so I'm gonna not touch it beyond changing its logging. "Send me the day's web error logs" is odd.