Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Side by Side Diff: packages/infra_libs/infra_libs/logs/README.md

Issue 2179853002: Added packages/infra_libs as the first Python package. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Final rebase (no actual changes) Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Logging in infra.git 1 # Logging in infra.git
2 2
3 ## Features 3 ## Features
4 4
5 The `infra_libs.logs` package contains some code to simplify logging and 5 The `infra_libs.logs` package contains some code to simplify logging and
6 make it consistent and easily configurable. Using it makes your code 6 make it consistent and easily configurable. Using it makes your code
7 future-proof. 7 future-proof.
8 8
9 Offered features: 9 Offered features:
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 LOGGER.info('great message') 50 LOGGER.info('great message')
51 LOGGER.error('terrible error') 51 LOGGER.error('terrible error')
52 ``` 52 ```
53 53
54 Using `logging.getLogger` is a good practice in general (not restricted to 54 Using `logging.getLogger` is a good practice in general (not restricted to
55 using infra_libs.logs) because it allows for module blacklisting and 55 using infra_libs.logs) because it allows for module blacklisting and
56 other goodness. It should be done at import time. See also the official 56 other goodness. It should be done at import time. See also the official
57 [logging HOWTO](https://docs.python.org/2/howto/logging.html). 57 [logging HOWTO](https://docs.python.org/2/howto/logging.html).
58 `infra_libs.logs` also formats the output of the root logger, but using 58 `infra_libs.logs` also formats the output of the root logger, but using
59 this logger is not recommended. 59 this logger is not recommended.
OLDNEW
« no previous file with comments | « packages/infra_libs/infra_libs/logs/.coveragerc ('k') | packages/infra_libs/infra_libs/logs/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698