notch
🪓 The Python logging micropackage
Purpose
You can use notch to quickly configure logging for your Python application. I designed notch to encapsulate and standardize logging configuration for Python applications that are deployed as container workloads. The default settings work in many simple cases, and you can further customize logging behavior with environment variables.
Usage
Import notch and call configure() to configure logging in your application entrypoint.
import notch
notch.configure()
Call configure() as early as possible in your application startup, because notch in turn
calls logging.basicConfig() to configure the logging system.
Using the default settings, notch will configure the root logger to send logs to
sys.stdout, set the log level to INFO, and set the log format to
'%(levelname)s [%(name)s] %(message)s'.
Configuration
You can change the behavior of notch by setting environment variables.
LOG_LEVEL: change the log level for the root logger. This can be any level the Python logging module recognizes:DEBUG,INFO(the default),WARNING,ERROR, orCRITICAL.LOG_FORMAT: change the format for log output. Use any placeholders defined in the Python logging documentation.OTHER_LOG_LEVELS: change the log level for loggers other than the root logger. See the explanation below.
Setting log levels for other modules
If you use third-party packages, you may want to set log levels for these packages
independently. For example, you may want to see DEBUG logs for your own code, but only
WARNING messages for other modules. You can do this by setting the OTHER_LOG_LEVELS
environment variable.
The value of this variable should be a module name and a log level separated by a colon. You can set log levels for multiple modules by separating entries with a space.
OTHER_LOG_LEVELS=first_module:WARNING second_module:ERROR
For a concrete example, if your application depends on boto3 but you only want to see errors
from boto3-related modules in your logs, configure like this:
OTHER_LOG_LEVELS=boto3:ERROR botocore:ERROR
You can specify submodules as well if you need to be more specific:
OTHER_LOG_LEVELS=apscheduler.scheduler:WARNING
Metadata
Release files for notch 2026.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| notch-2026.0.tar.gz | 2.3 kB | Without provenance | Details for notch-2026.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| notch-2026.0-py3-none-any.whl | Python 3 | none | any | Details for notch-2026.0-py3-none-any.whl |
Total release size: 5.1 kB
Release files / notch-2026.0.tar.gz
| Download URL | notch-2026.0.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1dcbf499a18d89449830fa7cdca36278dfbf01a025eb1c1414bac8071f9192a
|
|
BLAKE2b-256 checksum How to use checksums |
1edcda407d485b6498a7b0c9dd14dc8057f2106e3cbfe171fe6d9ae9048a7d76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / notch-2026.0-py3-none-any.whl
| Download URL | notch-2026.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1940240523a59c2a1659b948956ed3fe34c9105a860239908207d989f249cfa2
|
|
BLAKE2b-256 checksum How to use checksums |
626f735b624eb2ff90090687d4d74a959af2220c2bce091d121a983ce88f6a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for notch 2026.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.