Merge pull request #379 from msabramo/default_collect_print_dest

default.collect: Print target
This commit is contained in:
Axel Kittenberger 2016-05-24 10:30:06 +02:00
commit 7ec63e1eba
1 changed files with 17 additions and 9 deletions

View File

@ -98,15 +98,17 @@ default.collect = function( agent, exitcode )
-- TODO synchronize with similar code before -- TODO synchronize with similar code before
if not agent.isList and agent.etype == 'Init' then if not agent.isList and agent.etype == 'Init' then
if rc == 'ok' then if rc == 'ok' then
log('Normal', 'Startup of "',agent.source,'" finished.') log('Normal', 'Startup of ',agent.source,' -> ',agent.target,' finished.')
return 'ok' return 'ok'
elseif rc == 'again' then elseif rc == 'again' then
if settings('insist') then if settings('insist') then
log( log(
'Normal', 'Normal',
'Retrying startup of "', 'Retrying startup of ',
agent.source, agent.source,
'": ', ' -> ',
agent.target,
': ',
exitcode exitcode
) )
@ -114,9 +116,11 @@ default.collect = function( agent, exitcode )
else else
log( log(
'Error', 'Error',
'Temporary or permanent failure on startup of "', 'Temporary or permanent failure on startup of ',
agent.source, agent.source,
'". Terminating since "insist" is not set.' ' -> ',
agent.target,
'. Terminating since "insist" is not set.'
) )
terminate( -1 ) terminate( -1 )
@ -124,9 +128,11 @@ default.collect = function( agent, exitcode )
elseif rc == 'die' then elseif rc == 'die' then
log( log(
'Error', 'Error',
'Failure on startup of "', 'Failure on startup of ',
agent.source, agent.source,
'".' ' -> ',
agent.target,
'.'
) )
terminate( -1 ) terminate( -1 )
@ -135,9 +141,11 @@ default.collect = function( agent, exitcode )
'Error', 'Error',
'Unknown exitcode "', 'Unknown exitcode "',
exitcode, exitcode,
'" on startup of "', '" on startup of ',
agent.source, agent.source,
'".' ' -> ',
agent.target,
'.'
) )
return 'die' return 'die'
end end