I've been using the ZoneMinder software now for a couple days and I'm very impressed at the capabilities. I've run into a few issues and I've noted some things about the software and I'll post my findings in a few different topics.
The first issue is that it appears the documentation is wrong for setting the debug level for at least the zmc and zma programs. I needed to run zmc from the command line with full debug output so I could get some information on a issue I was having with a remote camera (that problem is in another topic). I exported the environment variable "ZM_DBG_LEVEL_zmc=9" but saw no difference in the debug output.
I took a look in the code and found that when initializing debug, the code looks in the environment for a variable named "ZM_DBG_LEVEL_" + the content of a variable called "zm_dbg_name". In the case of zmc (and zms), zm_dbg_name does not get set to "zmc", but rather "zmc" + "-" + the monitor id, which means, for example "zmc-d0" or "zmc-m1". This means that the environment variable would need to be named accordingly except it appears that "-" is an illegal character for an environment variable on linux.
As a test, I changed the code in zmc.cpp and zma.cpp to use an underscore instead of a hyphen ("zmc_m1") for the zm_dbg_name. I recompiled and set the environment variable as "ZM_DBG_LEVEL_zmc_m1=9". Then I got the full debugging output I expected. This also allows you to have a separate debug level for each copy of zmc for each monitor that you have which is very nice. If one particular monitor is giving you trouble, you can bump the debug level just for that one.
Environment Variables for zmc and zma debug level
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Hi Bruce,
You may be pleased to know that I've revamped this area somewhat for 1.20.0 and you can now use various environment variables to acheive the same result. So, in order of application, ZM_DBG_LVL_zmc_m9 will affect any zmc processes running for monitor 9, otherwise ZM_DBG_LVL_zmc will affect all zmc process and ZM_DBG_LVL will affect all ZM processes for which more specific env vars are not present etc.
Phil
You may be pleased to know that I've revamped this area somewhat for 1.20.0 and you can now use various environment variables to acheive the same result. So, in order of application, ZM_DBG_LVL_zmc_m9 will affect any zmc processes running for monitor 9, otherwise ZM_DBG_LVL_zmc will affect all zmc process and ZM_DBG_LVL will affect all ZM processes for which more specific env vars are not present etc.
Phil