-
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
Conversation
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.
github's diff is not doing a great line displaying this 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}: $!"); |
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.
@@ -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 comment
The 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 comment
The 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 comment
The 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.
(and delete a few long-dead lines)
previously, there was an odd number of spaces for the bulk of the `find` sub, which was sort of a pain to deal with
Now that the cron jobs are all(?) successfully loading PAUSE::Logger, we should use it. This replaces "warn" calls with use of $Logger.