Give error messages identifying log file on script errors (Closes: #122691, #195790, #222050, #306020) --- logrotate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) Index: logrotate-3.7.1/logrotate.c =================================================================== --- logrotate-3.7.1.orig/logrotate.c +++ logrotate-3.7.1/logrotate.c @@ -770,8 +770,8 @@ int rotateSingleLog(logInfo * log, int l if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) { message(MESS_DEBUG, "running prerotate script\n"); if (runScript(log->files[logNum], log->pre)) { - message(MESS_ERROR, "error running prerotate script, " - "leaving old log in place\n"); + message(MESS_ERROR, "error running prerotate script for %s, " + "leaving old log in place\n", log->files[logNum]); hasErrors = 1; } } @@ -853,7 +853,8 @@ int rotateSingleLog(logInfo * log, int l !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) { message(MESS_DEBUG, "running postrotate script\n"); if (runScript(log->files[logNum], log->post)) { - message(MESS_ERROR, "error running postrotate script\n"); + message(MESS_ERROR, "error running postrotate script for %s\n", + log->files[logNum]); hasErrors = 1; } }