New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging disappeared after switching from app.run(main) to main() #194
Comments
could you please provide a minimal repro with a full |
Thanks! This script should be able to reproduce the issue.
|
I think it is related to verbosity, but thought |
Yes, this is caused by verbosity. The default verbosity when not using So you can either set the That being said, if you only need to run
Hope this helps. |
Thanks! |
There are two logging methods in our code:
or
When we first used
app.run(main)
, everything is fine. All the log lines are output in absl.logging format.Then we needed to combine absl.flags with argparse, and used your solution in #27 (Let one parser parse "known flags", and the other parse the rest. Example 2) It works great except that we need to run
main()
instead ofapp.run(main)
And all the logging were gone.So we tried to add
absl.logging.use_absl_handler()
in__init__.py
following #148 Now we are able to see content fromlogger.xxx
in absl.logging format, but not those fromlogging.xxx
no matter it is from python logging or absl logging.Did I miss anything from
app.run()
or not using logging correctly?The text was updated successfully, but these errors were encountered: