hey folks, do we have a preferred way to activate ...
# development
c
hey folks, do we have a preferred way to activate debug/verbose in a tool when the
-ldebug
arg is passed? I can simply request
GlobalOptions
and then
if global_options.level > <http://LogLevel.INFO|LogLevel.INFO>:
, but is there a more approved way?
f
Maybe have a tool-specific option to set the tool’s log level? Or if applicable, a pass-through arguments option so the user can do it themselves?
c
I guess that's fair. I figured that if someone has
-ldebug
then they probably also wanted the debug logs, but I guess that's not necessarily true. Especially the inverse, that if they wanted the tool debug logs they don't necessarily want Pants's debug logs.
f
This is also an existing pattern. See for example https://www.pantsbuild.org/stable/reference/subsystems/pex#verbosity