Turning off INF messages

Support and queries relating to all previous versions of ZoneMinder
Locked
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Turning off INF messages

Post by SyRenity »

Hi.

I'm sure that this was answered before, but I couldn't find any relevant topics.

My syslog is constantly being filled with the INF messages, regarding various events happening to cameras. For example:

Dec 25 12:22:36 srv1 zma_m8[25990]: INF [Location1: 1912004 - Gone back into alarm state]
Dec 25 12:22:36 srv1 zma_m7[26167]: INF [Location2: 2090867 - Gone back into alarm state]
Dec 25 12:22:36 srv1 zma_m8[25990]: INF [Location1: 1912005 - Gone into alert state]
Dec 25 12:22:36 srv1 zma_m7[26167]: INF [Location2: 2090870 - Gone into alert state]
Dec 25 12:22:36 srv1 zma_m7[26167]: INF [Location2: 2090871 - Gone back into alarm state]
Dec 25 12:22:36 srv1 zma_m8[25990]: INF [Location1: 1912006 - Gone back into alarm state]
Dec 25 12:22:36 srv1 zma_m7[26167]: INF [Location2: 2090872 - Gone into alert state]

Is there any good way to turn these messages off, but with the option to turn them on back later?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i dont know but you could rotate them and set the rotation to daily. I wouldnt turn them off totally cos if you have a problem its best to have them, i know you could turn them back on, but they dont do any harm. One way to stop it totaaly would be to stop the syslog service
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

If you check the contribs topic, I'm pretty sure I posted a log rotation config for zm. I know it's not what you really want but it will help keep you log file sizes down. You would just need to add the entry for messages.
Regards,
Corey
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

Hi.

Rotating of /var/log/messages is not an issue - Fedora Core does it regularly. What I'm looking for, is a way to minimize the diagnostic output to there, because otherwise it's very easy to miss the different error messages which other parts of ZM produce, like zmc and zma. It is possible to modify the source code and recompile/replace the binaries, but I would like to avoid it for now.

In the latest version there were some debug options added, like ZM_EXTRA_DEBUG - has anyone tried them already? Or they are used to actually add more debug output, then limiting the current one?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

no lol they Create more. you could ask phil what he thinks, and i can understand your point, but i love having as much as possible logged, its great when you develop a wierd issue and need as much info as possible. maybe you can edit the syslog funtion to create another log filtered to your requirements. That way you have a light log with only nasties in, and then your maon messeges log when you need em
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Your best bet is probably to wait for 1.22.0. That has consolidated logging, which although it ordinarily uses syslog for important messages, INF, ERR etc, from all components, will additionally contain some guidance and tips for syslog.conf configuration to filter out anything but warnings and errors from /var/log/messages.

In the meantime you can set the debug level for zmc and zma to -1 (from 0) by altering the line that contains a call to zmDbgInit in zmc.cpp and zma.cpp. Then recompile etc.

Phil
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

Hi.

Which should be coming around these days, nope? ;)

Happy New Year btw!
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

It should be out as a preview release today. This will not include updated documentation for everything but will be a chance for people to test it and flag any problems before a full release later.

Phil
Locked