Page 1 of 2

Z-Way-Server log file

Posted: 19 May 2016 16:55
by jstaffon
I'm running v2.2.2 on Jessie and have been keeping an eye on the log file "/var/log/z-way-server.log". It appears to be growing quite rapidly. Over the past two days, it's grown to over 9 MB. I do have a couple errors to take care of but they make up a very small percentage of the overall file size. I can see this eventually causing problems with filling up the root partition. I know managing log files is something that should be done regularly but this amount of logging seems excess. Does the log file ever get moved to a format like "z-way-server.log.#" like syslog, messages, etc? Is it possible to change the level of logging to reduce the amount of information being logged?

Re: Z-Way-Server log file

Posted: 19 May 2016 17:13
by remoticz
Yes, it does create backups that rotate. So space won't fill up.
You can set log level in /opt/z-way-server/config.xml. By default it is set to the most verbose level 6. Level 0 ogs nothing. There is no specification for what the other log levels record

Re: Z-Way-Server log file

Posted: 19 May 2016 17:31
by jstaffon
Thanks for the quick reply. I was just about to edit my post because I came across the config.xml file in the root folder for z-way. Thanks for confirming that. My level is set to "0", which means the logging should be set to nothing but I'm getting a lot of stuff in the z-way-server.log file. My goal is to adjust the logging to a minimal level but to first try and find out why my javascript code isn't working anymore. Within the UI, there used to be a javascript error that got logged when the zway variable hadn't been defined. See "https://forum.z-wave.me/viewtopic.php?f=3419&t=23232". I'll play with these values and see how things change. Thanks again!

Re: Z-Way-Server log file

Posted: 20 May 2016 06:18
by jstaffon
UPDATE:
I played around with changing the value for logging in config.xml. I see something different. Unless I have an unusual thing going on....and I've had a few with v2.2.2, I see logging turned off at level 6 and high level of logging at level 0.

Re: Z-Way-Server log file

Posted: 18 Feb 2017 16:36
by brusan
You are absolutely right jstaffon. <log-level>0</log-level> logs everything (filling my logs at a rate of approximately 0.4MB per minute!) whereas <log-level>6</log-level> seems to prohibit any and all logging.
It would be nice if the people at z-wave.me could provide information on:
- What logging system is used (then we can find the rest of the info ourselves), or
- What is the meaning of the different log-level settings?
- How do I set the maximum size of the active log file before log rotation?
- How do I set the number of archived log files I want to save?

Thank you

Re: Z-Way-Server log file

Posted: 27 Feb 2017 23:20
by PoltoS
A bit of RTFM ;)

enum _ZWLogLevel
{
Debug = 0,
Information = 1,
Warning = 2,
Error = 3,
Critical = 4,
Silent = 5
};

You can use SIGHUP to force Z-Way to re-open the log (like most *nix daemons). This helps with logrotate

All the limiting by size and rotation is on you - use logrotate.

Re: Z-Way-Server log file

Posted: 06 Mar 2017 12:28
by 10neWulf
remoticz wrote:Yes, it does create backups that rotate. So space won't fill up.
Have you seen this actually happen? My logs fill up completely and zway is then no longer able to log... I dont believe it is a feature built in to zway..

I have needed to use Logrotate in order for this to occur.

Re: Z-Way-Server log file

Posted: 06 Mar 2017 23:10
by PoltoS
PoltoS wrote: You can use SIGHUP to force Z-Way to re-open the log (like most *nix daemons). This helps with logrotate

All the limiting by size and rotation is on you - use logrotate.
As stated above, yes, logrotate is required!

Re: Z-Way-Server log file

Posted: 08 Mar 2017 18:46
by fez
Z-way comes with the log level=debug out of the box.
I had no issues with that in the past, but ( I think ) the 2.3 version logs more than the previous ones.
It was generating over 100MB a day for me.
At this point I had to make some adjustments.
I would recommend to change the log level to 1 and you could edit the log rotate as well.
At this amount of logged data you could consider to log to the RAM, the SD card has its limits also.
All this has been discussed, just search the forum.

Re: Z-Way-Server log file

Posted: 08 Mar 2017 19:31
by PoltoS
2.3.0 have less logs than before (than 2.2.*). So it looks strange.... May be your network grew?