aboutsummaryrefslogtreecommitdiff
path: root/absl/flags/tests/flags_test.py
diff options
context:
space:
mode:
authorRichard Levasseur <rlevasseur@google.com>2020-04-08 09:33:40 -0700
committerCopybara-Service <copybara-worker@google.com>2020-04-08 09:34:05 -0700
commit326ac9f3ec9e6b22bbc52a97b214bacd921601de (patch)
tree53fc1b0e8f780c741a937ea3c2526f4dc1445bb0 /absl/flags/tests/flags_test.py
parenta97bd99f120275f732b547297dee0f1bd694afe7 (diff)
downloadabsl-py-326ac9f3ec9e6b22bbc52a97b214bacd921601de.tar.gz
Add logger level control flag, take 2.
This adds --logger_levels, a flag that allows setting the log levels of loggers by name. This makes it easy to adjust log levels on a per-logger basis without having to write application code to do so. Changes from original: * Use empty dict as the default value to work around some dependencies relying on the default matching the parsed value. * Return a copy instead of `MappingProxyType` because values are expected to be compatible with `copy.deepcopy()` PiperOrigin-RevId: 305493905 Change-Id: Ib826653b58d621aebc89aa1ded69647c534cde13
Diffstat (limited to 'absl/flags/tests/flags_test.py')
-rw-r--r--absl/flags/tests/flags_test.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/absl/flags/tests/flags_test.py b/absl/flags/tests/flags_test.py
index 0a54cd3..575164d 100644
--- a/absl/flags/tests/flags_test.py
+++ b/absl/flags/tests/flags_test.py
@@ -604,6 +604,7 @@ class FlagsUnitTest(absltest.TestCase):
'--kwery None',
'--l 9223372032559808512',
"--letters ['a', 'b', 'c']",
+ '--logger_levels {}',
"--m ['str1', 'str2']",
"--m_str ['str1', 'str2']",
'--name giants',
@@ -673,6 +674,7 @@ class FlagsUnitTest(absltest.TestCase):
'--kwery None',
'--l 9223372032559808512',
"--letters ['a', 'b', 'c']",
+ '--logger_levels {}',
"--m ['str1', 'str2', 'upd1']",
"--m_str ['str1', 'str2', 'upd1']",
'--name giants',