Z-Way-Server log file

Discussions about Z-Way software and Z-Wave technology in general
jstaffon
Posts: 80
Joined: 29 May 2015 04:47

Z-Way-Server log file

Post 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?
remoticz
Posts: 45
Joined: 07 Oct 2015 20:35
Location: no

Re: Z-Way-Server log file

Post 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
v2.1.1 raspi2
jstaffon
Posts: 80
Joined: 29 May 2015 04:47

Re: Z-Way-Server log file

Post 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!
jstaffon
Posts: 80
Joined: 29 May 2015 04:47

Re: Z-Way-Server log file

Post 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.
brusan
Posts: 38
Joined: 30 Aug 2016 00:54

Re: Z-Way-Server log file

Post 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
User avatar
PoltoS
Posts: 7571
Joined: 26 Jan 2011 19:36

Re: Z-Way-Server log file

Post 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.
10neWulf
Posts: 41
Joined: 21 Nov 2016 14:16
Location: Australia

Re: Z-Way-Server log file

Post 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.
User avatar
PoltoS
Posts: 7571
Joined: 26 Jan 2011 19:36

Re: Z-Way-Server log file

Post 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!
fez
Posts: 147
Joined: 20 Jul 2015 23:03

Re: Z-Way-Server log file

Post 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.
User avatar
PoltoS
Posts: 7571
Joined: 26 Jan 2011 19:36

Re: Z-Way-Server log file

Post by PoltoS »

2.3.0 have less logs than before (than 2.2.*). So it looks strange.... May be your network grew?
Post Reply