Skip to content

Commit bc02c24

Browse files
author
Viliam Holub
committed
Merge pull request LogentriesCommunity#33 from graingert/fix-manifest
Fix manifest, fix README on github
2 parents c383cc8 + abf9fef commit bc02c24

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include README.rst
2+
3+
recursive-exclude * __pycache__
4+
recursive-exclude * *.py[co]

README.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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

0 commit comments

Comments
 (0)