Formats Python log messages as log4j XMLLayout XML
Project description
XMLLayout provides a Python logging Formatter that formats log messages as XML, according to log4j’s XMLLayout specification.
XMLLayout 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 package also 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 xmllayout handler = xmllayout.RawSocketHandler('localhost', 4448) handler.setFormatter(xmllayout.XMLLayout()) logging.root.addHandler(handler)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file XMLLayout-0.3.tar.gz
.
File metadata
- Download URL: XMLLayout-0.3.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654880634e2c1d459148fa80bd8186ecfe36b07de45b31c0f5df6ae636094ccb |
|
MD5 | b3bdff32678d367f189d6745ace77704 |
|
BLAKE2b-256 | c10d99e0d582474251ef8e730f31035861cbe1e068033f7eeee611859b6b3e27 |
File details
Details for the file XMLLayout-0.3-py2.5.egg
.
File metadata
- Download URL: XMLLayout-0.3-py2.5.egg
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296bfe4f11bbe00cfc980554a9eeff9ed13345bc7ddf766dc983435016f031fb |
|
MD5 | 5ff9de428d76e84270a032ad9e64413f |
|
BLAKE2b-256 | 11e4e518cad618f94a62c677ef5d3085ba32b28693e69a71053adbd22dff418f |
File details
Details for the file XMLLayout-0.3-py2.4.egg
.
File metadata
- Download URL: XMLLayout-0.3-py2.4.egg
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32bda043cd6dd4e8d0f2562f6900c85888acc44eb316e13f6063ca6f4e190e65 |
|
MD5 | 71a906065f8eaedcb7101d5e421274d4 |
|
BLAKE2b-256 | c1cc06f91b18632080d6676fa711d8ea8c1062bf3a7c7ffac7444bf8410e6df8 |
File details
Details for the file XMLLayout-0.3-py2.3.egg
.
File metadata
- Download URL: XMLLayout-0.3-py2.3.egg
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e1329a70d363618734ade12ea48eed7457cfabdd53c0830ec07dfd266566f10 |
|
MD5 | 639aa39c23521fc7f53133208c0a33f7 |
|
BLAKE2b-256 | 1cb7f6d274a395b55bc2ee30668a9f4be23d4149bbd9fb38c4606a24c5fc89f2 |