Empty logs for zmc_m1.log and zma_m1.log

Forum for questions and support relating to the 1.30.x releases only.
Locked
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Empty logs for zmc_m1.log and zma_m1.log

Post by Simpler »

I'm logging INFO to log files
Screenshot from 2018-06-09 09-17-12.png
Screenshot from 2018-06-09 09-17-12.png (36.89 KiB) Viewed 2848 times
The other log files are populating correctly, but the zmc_m1.log and zma_m1.log are empty.

Code: Select all

 /var/log/zm $ ls -altr
total 124
drwxrwxr-x 19 root     syslog    4096 Jun  9 07:35 ..
-rw-r--r--  1 www-data www-data 12888 Jun  9 08:16 zmaudit.log
-rw-r--r--  1 www-data www-data   720 Jun  9 08:22 zma_m5.log
-rw-r--r--  1 www-data www-data   645 Jun  9 08:22 zmc_dvideo1.log
-rw-r--r--  1 www-data www-data  1219 Jun  9 08:23 zma_m2.log
-rw-r--r--  1 www-data www-data    80 Jun  9 08:24 zmc_dvideo0.log
-rw-r--r--  1 www-data www-data   450 Jun  9 08:40 zmsystemctl.log
-rw-r--r--  1 www-data www-data  5263 Jun  9 08:40 zmpkg.log
-rw-r--r--  1 www-data www-data     0 Jun  9 08:40 zmc_m1.log
-rw-r--r--  1 www-data www-data     0 Jun  9 08:40 zma_m1.log
-rw-r--r--  1 www-data www-data  3590 Jun  9 08:40 zmfilter.log
-rw-r--r--  1 www-data www-data 49782 Jun  9 08:40 zmdc.log
-rw-r--r--  1 www-data www-data  2159 Jun  9 08:40 zmwatch.log
-rw-r--r--  1 www-data www-data    95 Jun  9 08:45 zms.log
-rw-r--r--  1 www-data www-data     0 Jun  9 08:49 zmu.log
drwxr-xr-x  2 www-data root      4096 Jun  9 08:49 .
-rw-r--r--  1 www-data www-data   376 Jun  9 08:49 web_php.log

There is information for these in the interactive log screen:
Screenshot from 2018-06-09 09-14-49.png
Screenshot from 2018-06-09 09-14-49.png (56.87 KiB) Viewed 2848 times
Why are these two log files not populating?
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: Empty logs for zmc_m1.log and zma_m1.log

Post by Simpler »

I noticed that when ZoneMinder is restarted, these two files have content for a few seconds and then the content of the files are cleared. What scripts write to these two files. Something is clearing them.
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: Empty logs for zmc_m1.log and zma_m1.log

Post by Simpler »

If I enable debugging for _zmc_m1 (as shown in the image below), then the zmc_m1.log file doesn't get cleared during boot, but it doesn't write any additional changes to the file either.
Screenshot from 2018-06-10 17-02-43.png
Screenshot from 2018-06-10 17-02-43.png (45.13 KiB) Viewed 2836 times
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: Empty logs for zmc_m1.log and zma_m1.log

Post by Simpler »

After watching the logs for hours, I noticed that the files are getting populated, but they are delayed for hours and then they populate, but the last line is truncated and from hours ago.

Is there some kind of queue that only gets processed after some time or some size limit?
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: Empty logs for zmc_m1.log and zma_m1.log

Post by Simpler »

Any suggestions on how these log files are supposed to work?
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Empty logs for zmc_m1.log and zma_m1.log

Post by iconnor »

I seem to recall that in 1.30 every time zmc starts up it writes a new log file. I fixed this for 1.31. Also, due to not syncing the output after every line, it can take a long time before anything is actually written out to the file. It gets buffered.
Locked