Registry / observability / multiline-log-formatter

multiline-log-formatter

JSON →
library0.1.8pypypiunverified

A Python logging formatter that prefixes multiline log messages and tracebacks with the log level, ensuring uniform indentation for multi-line output. Current version 0.1.8. Low release cadence; last update 2022.

pip install multiline-log-formatter
INSTALL
IMPORT
SIG · MULTILINE-LOG-FORM
M
multiline-log-formatter
observabilitypythonv0.1.8
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MultilineLogFormatter
from multiline_formatter import MultilineLogFormatter
from multiline_log_formatter import MultilineLogFormatter

Basic usage with StreamHandler and exception logging.

import logging from multiline_log_formatter import MultilineLogFormatter logger = logging.getLogger(__name__) handler = logging.StreamHandler() formatter = MultilineLogFormatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') handler.setFormatter(formatter) logger.addHandler(handler) logger.setLevel(logging.DEBUG) logger.info('Single line message') try: 1/0 except: logger.exception('An error occurred')
Debug
Known issues
gotchaThe formatter does not prefix continuation lines of a multiline message with the log level; it only indents them. The prefix appears only on the first line.
fix
Check if the output meets your expectations; consider using a custom formatter if you need each line prefixed.
affects: all
gotchaThe package name in pip uses hyphens (multiline-log-formatter), but the Python import uses underscores (multiline_log_formatter).
fix
Import using underscores.
affects: all
deprecatedNo known deprecations. The package has not been updated since 2022.
fix
None.
affects: 0.1.8
Upgrade
Version history
0.1.8latest on PyPI · released Jan 15, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
2
Resources
multiline-log-formatter — pip install multiline-log-formatter · libregistry