ptarmiganlabs / butler-sos

Butler SenseOps Stats ("Butler-SOS") is a microservice publishing operational Qlik Sense metrics to InfluxDB, Prometheus and New Relic. Add Grafana for great looking dashboards and you get real-time monitoring of what happens inside a Qlik Sense environment.
https://butler-sos.ptarmiganlabs.com
MIT License
27 stars 13 forks source link

No console logging unless `--loglevel` parameter is specified when starting Butler SOS #925

Closed mountaindude closed 4 weeks ago

mountaindude commented 4 weeks ago

What version of Butler SOS are you using?

11.0.1

What version of Node.js are you using? Not applicable if you use the standalone version of Butler SOS.

18.20.3

What command did you use to start Butler SOS?

/Users/goran/.nvm/versions/node/v18.20.3/bin/node ./butler-sos.js --configfile ./config/production.yaml

What operating system are you using?

macOs

What CPU architecture are you using?

x86_64

What Qlik Sense versions are you using?

2024-May IR

Describe the Bug

When starting Butler SOS with /Users/goran/.nvm/versions/node/v18.20.3/bin/node ./butler-sos.js --configfile ./config/production.yaml the tool starts, but there is no log output what so ever.

Starting with /Users/goran/.nvm/versions/node/v18.20.3/bin/node ./butler-sos.js --configfile ./config/production.yaml --loglevel info shows the expected log output.

This is a regression error, prior to 11.0 this was not a problem.

Expected Behavior

No response

To Reproduce

No response

mountaindude commented 4 weeks ago

This bug is caused by setting logLevel to INFO rather than info in the config file.

Remove conversion to lower case in the config file schema, to throw a schema verification error if the log level is not lowercase.

mountaindude commented 4 weeks ago

Also, the config file schema is verified rather late in the startup process. Change so it is checked as quickly as possible after the path of the config file has been determined.

mountaindude commented 4 weeks ago

Update template config with info that logLevel setting is case sensitive, should be lower case.