You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-15Lines changed: 9 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,19 @@
1
-
A Python structured logger for Fluent
2
-
=====================================
1
+
# A Python structured logger for Fluent
2
+
3
3
4
4
Many web/mobile applications generate huge amount of event logs (c,f. login, logout, purchase, follow, etc). To analyze these event logs could be really valuable for improving the service. However, the challenge is collecting these logs seasily and reliably.
5
5
6
6
[Fluent](http://github.com/fluent/fluent) solves that problem by having: easy installation, small footprint, plugins, reliable buffering, log forwarding, etc.
7
7
8
8
**fluent-logger-python** is a Python library, to record the events from Python application.
9
9
10
-
Installation
11
-
------------
10
+
## Installation
12
11
13
12
This library is distributed as 'fluent-logger' python package. Please execute the following command to install it.
14
13
15
14
$ pip install fluent-logger
16
15
17
-
Configuration
18
-
-------------
16
+
## Configuration
19
17
20
18
Fluent daemon must be lauched with the following configuration:
21
19
@@ -24,11 +22,9 @@ Fluent daemon must be lauched with the following configuration:
24
22
port 24224
25
23
</source>
26
24
27
-
Usage
28
-
-----
25
+
## Usage
29
26
30
-
Event-Based Interface
31
-
^^^^^^^^^^^^^^^^^^^^^
27
+
### Event-Based Interface
32
28
33
29
First, you need to call logger.setup() to create global logger instance. This call needs to be called only once, at the beggining of the application for example.
34
30
@@ -51,9 +47,8 @@ Then, please create the events like this. This will send the event to fluent, wi
51
47
'from': 'userA',
52
48
'to': 'userB'
53
49
})
54
-
55
-
Python logging.Handler interface
56
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50
+
51
+
### Python logging.Handler interface
57
52
58
53
This client-library also has FluentHanler class for Python logging module.
59
54
@@ -68,7 +63,6 @@ This client-library also has FluentHanler class for Python logging module.
0 commit comments