de-duplicate log messages

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
Angrim
Posts: 5
Joined: Sun Mar 09, 2025 12:42 am

de-duplicate log messages

Post by Angrim »

I think it would be nice if the logging checked for duplicate messages and merged them when there are a whole bunch of the same message. Or at least in the case of "no route to host" have it just track how long it has been since the last success and log every half hour or so that there is still no route. I just had a camera come unplugged this morning and now have many thousands of log file entries about it. Messy.
ie.

3/11/25, 8:24:35 PM PDT zmc_m29 552832 ERR Failed to prime capture of initial monitor zmc.cpp 266
3/11/25, 8:24:35 PM PDT zmc_m29 552832 ERR Unable to open input rtsp://192.168.0.25:554/cam/realmonitor?channel=1&subtype=0 due to: No route to host zm_ffmpeg_camera.cpp 371
3/11/25, 8:24:26 PM PDT zmc_m29 552832 ERR Failed to prime capture of initial monitor zmc.cpp 266
3/11/25, 8:24:26 PM PDT zmc_m29 552832 ERR Unable to open input rtsp://192.168.0.25:554/cam/realmonitor?channel=1&subtype=0 due to: No route to host zm_ffmpeg_camera.cpp 371
3/11/25, 8:24:18 PM PDT zmc_m29 552832 ERR Failed to prime capture of initial monitor zmc.cpp 266
3/11/25, 8:24:18 PM PDT zmc_m29 552832 ERR Unable to open input rtsp://192.168.0.25:554/cam/realmonitor?channel=1&subtype=0 due to: No route to host zm_ffmpeg_camera.cpp 371
3/11/25, 8:24:11 PM PDT zmc_m29 552832 ERR Unable to open input rtsp://192.168.0.25:554/cam/realmonitor?channel=1&subtype=0 due to: No route to host zm_ffmpeg_camera.cpp 371
3/11/25, 8:24:08 PM PDT zmc_m29 552832 ERR Unable to open input rtsp://192.168.0.25:554/cam/realmonitor?channel=1&subtype=0 due to: No route to host zm_ffmpeg_camera.cpp 371
3/11/25, 8:24:05 PM PDT zmc_m29 552832 ERR Unable to open input rtsp://192.168.0.25:554/cam/realmonitor?channel=1&subtype=0 due to: No route to host zm_ffmpeg_camera.cpp 371
3/11/25, 8:24:01 PM PDT zmc_m29 552832 ERR Unable to open input rtsp://192.168.0.25:554/cam/realmonitor?channel=1&subtype=0 due to: No route to host zm_ffmpeg_camera.cpp 371
mikb
Posts: 691
Joined: Mon Mar 25, 2013 12:34 pm

Re: de-duplicate log messages

Post by mikb »

Angrim wrote: Wed Mar 12, 2025 3:56 am I think it would be nice if the logging checked for duplicate messages and merged them when there are a whole bunch of the same message.
Classic "syslog" does this, for some errors/warnings: "Last message repeated n times" -- it does indeed clear up the logs!
Post Reply