Spammy console output :)

Could I suggest an alternative to vanilla console output for Roon’s logging?

A lot of code these days uses which is controllable from ‘debug’ env var, and can optionally produce colored output to console to make it much easier to see what is coming from where and through setting on debug env var it is easy to control what is shown and what isn’t.

If it isn’t something you have time to look at yourselves, would you be open to a PR for the required changes to the node.js sdk modules?

Any extension authors have thoughts on this?

Regarding spammy output, you might have a look at this (if not seen already):

At extension run time you can change the level by writing the log_level property of the RoonApi object

roon_api = new RoonApi({ });

roon_api.log_level = 'none';


Be nice if everything used the same mechanism, though not helped I guess by node.js official stance which seem to be ‘use console’ :slight_smile:

Personally I am glad that the default is to “use the console” for logging.

I am using “systemd” to start/stop my extension (and other node js apps that I write), which means any output to console automatically goes to “journald” without any work on my part - just like every other Linux daemon that is running.

Of course that is Linux specific - don’t know about the situation on other operating systems.

I tend to use the node debug library just because I like that you can easy switch it on/off for a variety of different modules and a lot of modules use it (it still goes to console, but adds option of colouring and debug output namespaces that can be toggled on/off easily either via env var or from within program).

In the end they all go out via console, but it is kind of annoying for there to be a special case in there that is controlled differently to everything else and formats differently etc.