Bugzilla – Attachment 38283 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]
[Follow-up] Provide parameter $infos in cronlogaction() (Alternative for patch Bug 13889: Log with parameters)
Follow-up-Provide-parameter-infos-in-cronlogaction.patch (text/plain), 1.46 KB, created by
Marc Véron
on 2015-04-21 15:27:16 UTC
(
hide
)
Description:
[Follow-up] Provide parameter $infos in cronlogaction() (Alternative for patch Bug 13889: Log with parameters)
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-04-21 15:27:16 UTC
Size:
1.46 KB
patch
obsolete
>From fba332e7382d925599689e57d6283c8a60266187 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Tue, 21 Apr 2015 17:19:06 +0200 >Subject: [PATCH] [Follow-up] Provide parameter $infos in cronlogaction() > (Alternative for patch Bug 13889: Log with parameters) > >To test: > >- Apply patches interactive and skip following patch: Bug 13889: Log with parameters >- Tweak a cron job in order to call cronlogaction twice, one with a param at the beginning of the cron ob, e.g. >cronlogaction("This is my message") and one without param. >- Run this cron job. >Result: You should have two entries in the log, one with and one without additional information after the path and name of the calling script. >--- > C4/Log.pm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/Log.pm b/C4/Log.pm >index b6f5163..6871add 100644 >--- a/C4/Log.pm >+++ b/C4/Log.pm >@@ -83,15 +83,18 @@ sub logaction { > > =item cronlogaction > >- &cronlogaction(); >+ &cronlogaction($infos); > > Convenience routine to add a record into action_logs table from a cron job. >+Logs the path and name of the calling script plus the information privided by param $infos. > > =cut > > #' > sub cronlogaction { >- logaction( 'CRONJOBS', 'Run', 0, (caller(0))[1] ) if C4::Context->preference('CronjobLog'); >+ my ($infos)=@_; >+ my $loginfo = (caller(0))[1] . ' ' . $infos; >+ logaction( 'CRONJOBS', 'Run', 0, $loginfo ) if C4::Context->preference('CronjobLog'); > } > > >-- >1.7.10.4
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