File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed
Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ include README.rst
2+
3+ recursive-exclude * __pycache__
4+ recursive-exclude * *.py[co]
Original file line number Diff line number Diff line change 1+ Logentries Logger
2+ =================
3+
4+ This is a plugin library to enable logging to Logentries from the Python
5+ Logger. Logentries is a real-time log management service on the cloud.
6+ More info at https://logentries.com. Note that this plugin is
7+ **asynchronous **.
8+
9+ Setup
10+ -----
11+
12+ To use this library, you must first create an account on Logentries.
13+ This will only take a few moments.
14+
15+ Install
16+ -------
17+
18+ To install this library, use the following command:
19+
20+ ``pip install logentries ``
21+
22+ Usage
23+ -----
24+
25+ ::
26+
27+ #!/usr/bin/env python
28+
29+ from logentries import LogentriesHandler
30+ import logging
31+
32+ log = logging.getLogger('logentries')
33+ log.setLevel(logging.INFO)
34+ test = LogentriesHandler(LOGENTRIES_TOKEN)
35+
36+ log.addHandler(test)
37+
38+ log.warn("Warning message")
39+ log.info("Info message")
40+
41+ sleep(10)
42+
43+ Configure
44+ ---------
45+
46+ The parameter ``LOGENTRIES_TOKEN `` needs to be filled in to point to a
47+ file in your Logentries account.
48+
49+ In your Logentries account, create a logfile, selecting ``Token TCP `` as
50+ the source\_ type. This will print a Token UUID. This
51+ is the value to use for ``LOGENTRIES_TOKEN ``.
52+
53+ The appender will attempt to send your log data over TLS over port 443,
54+ otherwise it will send over port 80.
55+
56+ You are now ready to start logging
You can’t perform that action at this time.
0 commit comments