CronPlus: disable syslog [info] entries

G'day y'all...

I am trying to find a way to disable all of the [info] log entries in the syslog file from the various cronplus nodes I have in my flows....

Anybody managed to do this? (If so.... How?)

Regds
Ed

Hi, i have an outstanding task to do that - my apologies it is not yet done

I will attempt to get this fixed soon

3 Likes

Oh wow!!

Thanks for the prompt comeback!!

I Luuuuurve cron plus btw!!

Cheers
Ed

I've got an open git issue for this, which I created in January.
In the meantime, I've edited cronplus.js and edited out these lines, so that they read;

/*
            try {
                node.log(`createTask - index: ${index}, static: ${static}, opt: ${JSON.stringify(opt)}`);
            } catch (error) {
                node.error(error);
            }
*/

But of course my edit get's over-written each time I update Cron+, but it's a 2 minute job, and avoids the log getting polluted with information that I don't need to see.

[EDIT -] More replies whilst I was typing


[added by @zenofmud to make it easier for others to find the location of the code]
If you want to fix it you need to edit the cronplus.js file.

nano $HOME/.node-red/node_modules/node-red-contrib-cron-plus/cronplus.js

Then press ctrl-w (which is the keyboard shortcut for 'search) and enter function createTask to locate the code in the file to edit.

Then change the code to look like this:

        function createTask(node, opt, index, static) {
            opt = opt || {};
/*
            try {
                node.log(`createTask - index: ${index}, static: ${static}, opt: ${JSON.stringify(opt)}`);
            } catch (error) {
                node.error(error);
            }
*/
            applyOptionDefaults(opt, index);

Save the file (ctrl-x then y then return) and reboot Node-RED

1 Like

Thanks Paul,

That might just work for me in the interim...

Pray tell, can I just edit and save or must I restart something to get the changes "active"?

Regds
Ed

You just need to restart node-RED to read in the change.

Shotto!!

Will give it a go!!

Cheerz
E

Works a treat!!

1 Like

Hopefully you will move the messages to debug or trace rather than removing them? They can occasionally be helpful after all :smiley:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.