Formats Python log messages as log4j XMLLayout XML
Project description
xmllayout2 provides a Python logging Formatter that formats log messages as XML, according to `log4j's XMLLayout specification
xmllayout2 formatted log messages can be viewed and filtered within the Chainsaw application (see the example section below), part of the Java based log4j project.
This is a fork of Philip Jenveys fork of xmllayout maintained for usage in commercial projects, with supporting a variety of Python versions.
Installation
via pip: pip install xmllayout2
for local development: pip install .
Usage
This package includes a RawSocketHandler -- like
logging.handler.SocketHandler, but sends the raw log message over the socket
instead of a pickled version. RawSocketHandler can be configured to send log
messages to Chainsaw directly over a socket.
For example to forward log messages to Chainsaw, if it were listening on localhost port 4448:
import logging
import xmllayout2
handler = xmllayout2.RawSocketHandler('localhost', 4448)
handler.setFormatter(xmllayout2.XMLLayout())
logging.root.addHandler(handler)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xmllayout2-2.0.2.tar.gz.
File metadata
- Download URL: xmllayout2-2.0.2.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b3825f251ea94c9a3b247045760ea1e47fe8420c3a5dd5ec5a73be6769bc0b3
|
|
| MD5 |
f0522a41981fe61923e16460dd2cb45d
|
|
| BLAKE2b-256 |
83f4b59c4d864f4d200f27a7846c69089e47216df049ea29ed0244b89bf2b350
|
Provenance
The following attestation bundles were made for xmllayout2-2.0.2.tar.gz:
Publisher:
python-package.yml on jonasdlindner/xmllayout2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xmllayout2-2.0.2.tar.gz -
Subject digest:
6b3825f251ea94c9a3b247045760ea1e47fe8420c3a5dd5ec5a73be6769bc0b3 - Sigstore transparency entry: 175117065
- Sigstore integration time:
-
Permalink:
jonasdlindner/xmllayout2@28ef43cc87030e4dfb37a1ac78fab4c607d7a427 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/jonasdlindner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@28ef43cc87030e4dfb37a1ac78fab4c607d7a427 -
Trigger Event:
release
-
Statement type:
File details
Details for the file xmllayout2-2.0.2-py3-none-any.whl.
File metadata
- Download URL: xmllayout2-2.0.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
346cec2f84b059b06d3835a03c4dc20dbc5c6f1ed082b4de4786f369cd84681b
|
|
| MD5 |
b0a658236616f0374afc7d29810e58dd
|
|
| BLAKE2b-256 |
6ce6e0abee4a7ab68e6b83a4c38b4b8e81fe507929526f43793d3ec121d76be9
|
Provenance
The following attestation bundles were made for xmllayout2-2.0.2-py3-none-any.whl:
Publisher:
python-package.yml on jonasdlindner/xmllayout2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xmllayout2-2.0.2-py3-none-any.whl -
Subject digest:
346cec2f84b059b06d3835a03c4dc20dbc5c6f1ed082b4de4786f369cd84681b - Sigstore transparency entry: 175117070
- Sigstore integration time:
-
Permalink:
jonasdlindner/xmllayout2@28ef43cc87030e4dfb37a1ac78fab4c607d7a427 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/jonasdlindner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package.yml@28ef43cc87030e4dfb37a1ac78fab4c607d7a427 -
Trigger Event:
release
-
Statement type: