Re:Curl doesn't add libproxy due to its quality issues
by bornfreddy on Sunday October 23, 2022 @01:08PM
(#33308459)
No, the levels are not useless, far from it. Even if you just print to stdout, prefixing each line with a (maybe colored?) level info is very useful. Also, if later you decide to use xyz format, it is trivial to implement this. Changing all logging calls? Not so much.
Re:Curl doesn't add libproxy due to its quality issues
by bombolo on Sunday October 23, 2022 @05:32PM
(#33310479)
Just use a real logging daemon and it will be the colours by itself.
It will also let you query for which level you want.
> Changing all logging calls? Not so much.
Uh? Make a good library using the same interface.
Re:Curl doesn't add libproxy due to its quality issues
by lightswitch05 on Monday October 24, 2022 @12:26AM
(#33312930)
To answer your question, the levels are important for both regular usage and debugging when something goes wrong. I create a number of debug/info/warning/error log messages throughout the tool and allow the desired level of logging to be set as a CLI argument - or even run in silent mode if desired.
Do you print to /dev/stdlog using the correct syslog format or use journald and its format?
Because if it's not one of those, the "levels" are useless.