-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKG-INFO
69 lines (56 loc) · 3.41 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Metadata-Version: 1.0
Name: logFaces XMLLayout
Version: 1.0
Summary: Formats Python log messages as log4j XMLLayout XML for logFaces
Home-page (original version): http://pypi.python.org/pypi/XMLLayout
Author: Philip Jenvey
Author-email: [email protected]
Co-author: Stojan Joviæ
Co-author-email: [email protected]
License: BSD
Description: XMLLayout provides a Python logging Formatter that formats log messages as XML,
according to `log4j's XMLLayout specification
<http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/XMLLayout.html>`_.
XMLLayout formatted log messages can be viewed and filtered within the
`Chainsaw <http://logging.apache.org/log4j/docs/chainsaw.html>`_ 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)
In this modified version of XMLLayout, there is now added support for one new application
(similar to Chainsaw, but much more powerful), which name is logFaces! Example of usage
XMLLayout module with logFaces (i.e. logFaces Python Logging Support) is the same as above
example for Chainsaw (notice and remember that default logFaces TCP listening port is 55200).
In this case, the DEFAULT DOMAIN is used... More about logFaces domains find in official
logFaces documentation here:
<http://www.moonlit-software.com/logfaces/web/downloads/23514/logfaces-manual.pdf>
To forward log messages to logFaces, if it were listening on localhost TCP port 55200, but
using specific DOMAIN (for example "TEST_DOMAIN") and real HOST name, do following:
import socket
import logging
import xmllayout
handler = xmllayout.RawSocketHandler('localhost', 55200)
properties = xmllayout.properties.Log4jProperties(hostname=socket.gethostname(),
application='TEST_DOMAIN')
handler.setFormatter(xmllayout.XMLLayout(properties))
logging.root.addHandler(handler)
For more informations about logFaces XMLLayout usage, see "logFaces_logger_example.py"
Python file with simple demonstrations...
IMPORTANT: logFaces is commercial, non-free application, so you can use the same only under
the terms of his developers (MoonLit Software)! More informations you can find here:
<http://www.moonlit-software.com/logfaces/web/>
Keywords: logging log4j
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Topic :: System :: Logging