You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my app, I have two sources of logging, Tamino and Papageno. I use logs.cli to setup the logging of my app in a similar fashion as the example. However, in debug mode, Papageno is extremely verbose and I'm much more interested by what Tamino has to say. Could it be possible to extend the API and find some way to set the verbosity of sources from the command-line interface? I can always add code to disable debug output from Papageno, but that's what I was trying to avoid by switching to logs.cli.
As I understand the API, logs.cli should not set the verbosity of sources directly, but rather return the verbosity set by the user, so it might be difficult to extend the current API (Logs_cli.level) or come up with a new function.
Regarding the actual command-line interface, I think it could look like this:
app --verbosity=debug # set the debug level for each source
app --verbosity=tamino:debug # set the verbosity of Tamino to debug. Pamino has the default level.
app --tamino-verbosity=debug # other syntax proposal
app --verbosity=tamino:debug,pamino:info
app --verbosity=tamino:debug --verbosity=pamino:info
app --tamino-verbosity=debug --pamino-verbosity=info
What style looks the "sanest" to you? I think that only the verbosity flag needs the name expansion.
The text was updated successfully, but these errors were encountered:
I think I would go with --verbosity=LEVEL[,SRC:LEVEL]…
That's quite nice!
Did you look around if there may be existing syntax to copycat from (e.g. journalctl or whatever) ?
journalctl doesn't seem to be able to do that. I can see that it can select multiple sources (-t or -u flags) but the -p flag to select the level is global.
In my app, I have two sources of logging, Tamino and Papageno. I use logs.cli to setup the logging of my app in a similar fashion as the example. However, in debug mode, Papageno is extremely verbose and I'm much more interested by what Tamino has to say. Could it be possible to extend the API and find some way to set the verbosity of sources from the command-line interface? I can always add code to disable debug output from Papageno, but that's what I was trying to avoid by switching to logs.cli.
As I understand the API, logs.cli should not set the verbosity of sources directly, but rather return the verbosity set by the user, so it might be difficult to extend the current API (
Logs_cli.level
) or come up with a new function.Regarding the actual command-line interface, I think it could look like this:
What style looks the "sanest" to you? I think that only the
verbosity
flag needs the name expansion.The text was updated successfully, but these errors were encountered: