Bugzilla – Attachment 38239 Details for
Bug 13889
Add information about cron jobs to system log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13889: Log with parameters
Bug-13889-Log-with-parameters.patch (text/plain), 1.58 KB, created by
Jonathan Druart
on 2015-04-21 11:22:10 UTC
(
hide
)
Description:
Bug 13889: Log with parameters
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-21 11:22:10 UTC
Size:
1.58 KB
patch
obsolete
>From 90d4550f61aedff65e15979dc063f06fbd408fa3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 21 Apr 2015 13:20:26 +0200 >Subject: [PATCH] Bug 13889: Log with parameters > >This patch proposes to log the cronjob filepath with the parameters. >On this way, we will get even more information. > >Note that the @ARGV is modified by GetOptions and have to be put before. >--- > C4/Log.pm | 3 ++- > misc/cronjobs/overdue_notices.pl | 3 +-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Log.pm b/C4/Log.pm >index b6f5163..e7a025e 100644 >--- a/C4/Log.pm >+++ b/C4/Log.pm >@@ -91,7 +91,8 @@ Convenience routine to add a record into action_logs table from a cron job. > > #' > sub cronlogaction { >- logaction( 'CRONJOBS', 'Run', 0, (caller(0))[1] ) if C4::Context->preference('CronjobLog'); >+ my ( @params ) = @_; >+ logaction( 'CRONJOBS', 'Run', 0, "@params" ) if C4::Context->preference('CronjobLog'); > } > > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 7068d3d..2b7d8a8 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -294,6 +294,7 @@ my @myborcat; > my @myborcatout; > my ( $date_input, $today ); > >+cronlogaction(join ' ', $0, @ARGV); > GetOptions( > 'help|?' => \$help, > 'man' => \$man, >@@ -315,8 +316,6 @@ GetOptions( > pod2usage(1) if $help; > pod2usage( -verbose => 2 ) if $man; > >-cronlogaction(); >- > if ( defined $csvfilename && $csvfilename =~ /^-/ ) { > warn qq(using "$csvfilename" as filename, that seems odd); > } >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13889
:
37082
|
37325
|
37679
|
37707
|
37711
|
38116
|
38183
|
38227
|
38228
|
38229
|
38230
|
38236
|
38239
|
38283
|
38406
|
38407
|
38408
|
38409