structlog-journald
Structlog processor to send logs to journald.
Documentation: https://structlog-journald.readthedocs.io
Installation
To install structlog-journald, run:
pip install structlog-journald
Or with uv:
uv add structlog-journald
Usage
Add the structlog_journald.JournaldProcessor to your list of structlog processors.
It will do nothing if the journald socket is not available,
in other words, the app was not started by systemd.
To let the log have more useful information, you should also add these processors before JournaldProcessor:
CallsiteParameterAdderformat_exc_info
Example:
import getpass
import logging
import platform
import structlog
from structlog_journald import JournaldProcessor
structlog.configure(
processors=[
structlog.contextvars.merge_contextvars,
structlog.processors.add_log_level,
structlog.processors.CallsiteParameterAdder(),
structlog.processors.format_exc_info,
structlog.dev.set_exc_info,
structlog.processors.TimeStamper(fmt='%Y-%m-%d %H:%M:%S', utc=False),
structlog.processors.EventRenamer('message'),
JournaldProcessor(),
# This processor should be added for development environment only.
structlog.dev.ConsoleRenderer(),
],
# In this example, we want to print log entries of all levels
wrapper_class=structlog.make_filtering_bound_logger(logging.NOTSET),
context_class=dict,
logger_factory=structlog.WriteLoggerFactory(),
cache_logger_on_first_use=True,
)
log = structlog.stdlib.get_logger()
user = getpass.getuser()
log.info('Current Linux user: %s', user, linux=platform.freedesktop_os_release())
log.warning('This is a warning.', platform=platform.platform())
try:
int('abc')
except ValueError:
log.exception('Failed to convert string to integer.')
Metadata
Release files for structlog-journald 1.0.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 |
|---|---|---|---|---|
| structlog_journald-1.0.0.tar.gz | 125.3 kB | With provenance | Details for structlog_journald-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| structlog_journald-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for structlog_journald-1.0.0-py3-none-any.whl |
Total release size: 131.5 kB
Release files / structlog_journald-1.0.0.tar.gz
| Download URL | structlog_journald-1.0.0.tar.gz |
|---|---|
| Size | 125.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
230bbf8489217bb98058ea146e311eafa49417b8dc46876ecf155d0d51d4cf59
|
|
BLAKE2b-256 checksum How to use checksums |
e98d336f540f7592307cdf8a3b445dd3bc87a17891e3ad68717d22b834a4494f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 17, 2026.
Transparency logRelease files / structlog_journald-1.0.0-py3-none-any.whl
| Download URL | structlog_journald-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0aa09a7485070ccd58e56754de327d5c1062a06cd222d5128cfe49d0cf5ebc4c
|
|
BLAKE2b-256 checksum How to use checksums |
92021835b6d29da8eb5a1d4f8ed1c57259091711084cb1d5d3422e320e9960c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 17, 2026.
Transparency logSecurity for structlog-journald 1.0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for structlog_journald-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 17, 2026.
Transparency logA 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.