How to disable all debug ?

Support and queries relating to all previous versions of ZoneMinder
Locked
loop
Posts: 69
Joined: Thu Nov 06, 2003 3:10 pm

How to disable all debug ?

Post by loop »

Hi

I want to make unattended system which would create no logs. In readme it says that environment variable ZM_DBG_LEVEL should be set to -1. It doesn't work for me, zma still reports activity detection into syslog.

I run in shell: export ZM_DBG_LEVEL_zmc=-1

Can someone help?
Thanks, D.
User avatar
fernando
Posts: 240
Joined: Thu Jul 10, 2003 6:00 pm

Post by fernando »

create a cron job that delete them each week
Fernando
trunet
Posts: 5
Joined: Thu Oct 14, 2004 5:29 pm
Location: São Paulo/SP/Brazil
Contact:

Post by trunet »

My SYSLOG has 15MB of zoneminder debug log messages. I don´t think rm /var/log/syslog.0 is a good thing to do.

How we supressed the debug log messages of zoneminder? I did the export too and nothing works. The documentation is right about this?

I´ll LOVE if this debug messages DISAPPEAR from my syslog :D

tkz...

Wagner Sartori Junior
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

It might be worth giving us a hit what the messages say. I rotate syslog daily, and it gets to about 1Mb in that time, but only a fraction of that is down to zoneminder, and most of zoneminder's output looks like this:

Code: Select all

Oct 17 20:24:31 duma zms[16537]: INF [Debug Level = 0, Debug Log = ]
Oct 17 20:25:02 duma zms[16578]: INF [Debug Level = 0, Debug Log = ]
Oct 17 20:25:02 duma zms[16580]: INF [Debug Level = 0, Debug Log = ]
Oct 17 20:26:19 duma zma-m7[16738]: INF [Final score 58, 1 blobs, 1698 pixels, 1698 min, 1698 max]
Oct 17 20:26:19 duma zma-m7[16738]: INF [Final score 58, 1 blobs, 1591 pixels, 1591 min, 1591 max]
Oct 17 20:26:19 duma zma-m7[16738]: INF [Door: 135549 - Gone into alarm state]
Oct 17 20:26:20 duma zma-m7[16738]: INF [Final score 58, 1 blobs, 1549 pixels, 1549 min, 1549 max]
Oct 17 20:26:20 duma zma-m7[16738]: INF [Final score 58, 1 blobs, 1538 pixels, 1538 min, 1538 max]
Oct 17 20:26:20 duma zma-m7[16738]: INF [Final score 58, 1 blobs, 1495 pixels, 1495 min, 1495 max]
Oct 17 20:26:21 duma zma-m7[16738]: INF [Final score 57, 1 blobs, 1444 pixels, 1444 min, 1444 max]
Oct 17 20:26:21 duma zma-m7[16738]: INF [Final score 56, 1 blobs, 1311 pixels, 1311 min, 1311 max]
Oct 17 20:26:22 duma zma-m7[16738]: INF [Door: 135555 - Gone into alert state]
Oct 17 20:26:27 duma zma-m7[16738]: INF [Door: 135567 - Left alarm state (67750) - 27(6) images]
...with occasional entries like this

Code: Select all

Oct 17 19:15:23 duma zmc-d1[16733]: INF [Door: 126000 - Capturing at 2.26 fps]
Oct 17 19:15:24 duma zma-m7[16738]: INF [Door: 126000 - Processing at 2.26 fps]
That's the stuff you want to suppress, presumably?
Rick Hewett
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

It would seem to me that you have to identify the program that's generating the unwanted diagnostics and append that to the environmental name, so that would be ZM_DBG_LEVEL_zmc, ZM_DBG_LEVEL_zms or ZM_DBG_LEVEL_zma as appropriate, and you'd need all three set to catch the lot. If you just set ZM_DBG_LEVEL_zmc then most of the diagnostics aren't going to be affected...
Rick Hewett
User avatar
securiteaze
Posts: 25
Joined: Wed Jun 16, 2004 5:38 pm

Post by securiteaze »

You could link you logs to null.

Code: Select all

ln -s /var/log/syslog /dev/null
Or one of my favorites.

Code: Select all

ln -sf /home/securiteaze/.bash_history /dev/null
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

You can completely compile out all debug, which you might as well do if you don't want to use it.

You'll have to change the Makefile in the src directory to pass in ZM_DBG_OFF via a -DZM_DBG_OFF flag to the compiler. This will totally remove any and all debug.

Phil,
Locked