Update ag_logging.py with clarity and reference

* fixes typo
* adds clarity to text
* adds reference to absl's logging doc page

ref #29250
This commit is contained in:
G. Hussain Chinoy 2019-06-06 21:13:16 -06:00 committed by GitHub
parent f5003f6315
commit 6113337060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ def set_verbosity(level, alsologtostdout=False):
More verbose logging is useful to enable when filing bug reports or doing More verbose logging is useful to enable when filing bug reports or doing
more in-depth debugging. more in-depth debugging.
There are two controls that control the logging verbosity: There are two parameters that control the logging verbosity:
* The `set_verbosity` function * The `set_verbosity` function
@ -70,7 +70,8 @@ def set_verbosity(level, alsologtostdout=False):
# No effect, because set_verbosity was already called. # No effect, because set_verbosity was already called.
``` ```
Logs entries are output to [absl](https://abseil.io)'s default output, Logs entries are output to [absl](https://abseil.io)'s
[default output](https://abseil.io/docs/python/guides/logging),
with `INFO` level. with `INFO` level.
Logs can be mirrored to stdout by using the `alsologtostdout` argument. Logs can be mirrored to stdout by using the `alsologtostdout` argument.
Mirroring is enabled by default when Python runs in interactive mode. Mirroring is enabled by default when Python runs in interactive mode.
@ -78,7 +79,7 @@ def set_verbosity(level, alsologtostdout=False):
Args: Args:
level: int, the verbosity level; larger values specify increased verbosity; level: int, the verbosity level; larger values specify increased verbosity;
0 means no logging. When reporting bugs, it is recommended to set this 0 means no logging. When reporting bugs, it is recommended to set this
value to a larges number, like 10. value to a larger number, like 10.
alsologtostdout: bool, whether to also output log messages to `sys.stdout`. alsologtostdout: bool, whether to also output log messages to `sys.stdout`.
""" """
global verbosity_level global verbosity_level