Excessive logging in EMONCMS.log

I want to dial back the logging in EMONCMS.log but it seems to already be set to WARN in /var/www/emoncms/logconfig.xml which presumably means it should only log warning messages?

My logfile is full of INFO messages like

2015-9-8 14:38:39 MQTT INFO Received mqtt message: emonhub/rx/1/values 0

2015-9-8 14:38:39 MQTT INFO Received mqtt message: emonhub/rx/3/values 89

In settings.php I have 

// Log4PHP configuration
    $log4php_configPath = 'logconfig.xml';

and in logconfig.xml I have

<configuration xmlns="http://logging.apache.org/log4php/">
<appender name="myAppender" class="LoggerAppenderFile">
<param name="file" value="/var/log/emoncms.log" />
</appender>
<root>
<level value="WARN" />
<appender_ref ref="myAppender" />
</root>
</configuration>

Can someone tell me where I can turn this off?

Further investigation suggests the source may be something to do with /var/www/emoncms/Modules/nodes/nodes_mqtt_process.php but editing anything to do with logging in there breaks emoncms. Editing the logfile path in logconfig.xml does nothing, whereas editing it in nodes_mqtt_process.php changes the logfile name.

Paul Reed's picture

Re: Excessive logging in EMONCMS.log

Yes, I've tried too and failed!

I tried to filter the log to 'ERROR' because the log filesize was growing out of proportion, and thought that it would be a simple task having read the log4php guide. but hit the first stumbling block when the emoncms log file wasn't at /var/log/emoncms.log !

Paul

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.