[interchange] Fix logging messages for Jobs so ErrorDestination can redirect them
Josh Lavin <[email protected]>
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit f87a69551d4254327eb641c6f1226cf8a03a3c5e Author: Josh Lavin <[email protected]> Date: Mon Dec 24 15:24:45 2012 -0800 Fix logging messages for Jobs so ErrorDestination can redirect them Allows directives like this to work: ErrorDestination "Run jobs group=%s pid=%s" logs/jobs_run.log ErrorDestination "Finished jobs group=%s pid=%s" logs/jobs_run.log lib/Vend/Dispatch.pm | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- diff --git a/lib/Vend/Dispatch.pm b/lib/Vend/Dispatch.pm index c39f7fb..d944803 100644 --- a/lib/Vend/Dispatch.pm +++ b/lib/Vend/Dispatch.pm @@ -723,7 +723,7 @@ sub run_in_catalog { open_cat($cat); - logError("Run jobs group=%s pid=$$", $job || 'INTERNAL'); + logError("Run jobs group=%s pid=%s", $job || 'INTERNAL', $$); Vend::Server::set_process_name("job $cat $job"); @@ -824,7 +824,7 @@ sub run_in_catalog { $errors = 1; $failure = errmsg('Job terminated with an error: %s', $@); - logError ("Job group=%s pid=$$ terminated with an error: %s", $job || 'INTERNAL', $@); + logError ("Job group=%s pid=%s terminated with an error: %s", $job || 'INTERNAL', $$, $@); # remove flag for this job Vend::Server::flag_job($$, $cat, 'furl'); @@ -846,7 +846,7 @@ sub run_in_catalog { } $out .= full_dump() if is_yes($jobscfg->{add_session}); - logError("Finished jobs group=%s pid=$$", $job || 'INTERNAL'); + logError("Finished jobs group=%s pid=%s", $job || 'INTERNAL', $$); close_cat();