Added the total number of errors when logging new recording errors

This commit is contained in:
Klaus Schmidinger 2024-01-20 20:04:03 +01:00
parent 5d984b606e
commit 78b7e4e252
2 changed files with 4 additions and 3 deletions

View File

@ -9879,3 +9879,4 @@ Video Disk Recorder Revision History
Matthias Senzel). Matthias Senzel).
- Added the move constructor to cString for better performance (thanks to Markus - Added the move constructor to cString for better performance (thanks to Markus
Ehrnsperger). Ehrnsperger).
- Added the total number of errors when logging new recording errors.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: recorder.c 5.5 2023/12/28 21:22:29 kls Exp $ * $Id: recorder.c 5.6 2024/01/20 20:04:03 kls Exp $
*/ */
#include "recorder.h" #include "recorder.h"
@ -235,8 +235,8 @@ void cRecorder::HandleErrors(bool Force)
if (errors > lastErrors) { if (errors > lastErrors) {
int d = errors - lastErrors; int d = errors - lastErrors;
if (DebugChecks) if (DebugChecks)
fprintf(stderr, "%s: %s: %d error%s\n", *TimeToString(time(NULL)), recordingName, d, d > 1 ? "s" : ""); fprintf(stderr, "%s: %s: %d new error%s (total %d)\n", *TimeToString(time(NULL)), recordingName, d, d > 1 ? "s" : "", errors);
esyslog("%s: %d error%s", recordingName, d, d > 1 ? "s" : ""); esyslog("%s: %d new error%s (total %d)", recordingName, d, d > 1 ? "s" : "", errors);
recordingInfo->SetErrors(oldErrors + errors); recordingInfo->SetErrors(oldErrors + errors);
recordingInfo->Write(); recordingInfo->Write();
LOCK_RECORDINGS_WRITE; LOCK_RECORDINGS_WRITE;