Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
logger | ||
====== | ||
|
||
logging server written on gevent | ||
logging server written on gevent | ||
|
||
|
||
Run log server: | ||
--------------- | ||
``` | ||
from netlog import Server | ||
Server('./logs', 5010).start() | ||
``` | ||
|
||
|
||
Usage from clients: | ||
------------------- | ||
``` | ||
from netlog import Client | ||
client = Client('127.0.0.1', 5010, 'logname') | ||
client.send('qwe asd') | ||
client.send('ert \n dfg') # may be multiline | ||
client.close() # or del client | ||
``` | ||
|
||
|
||
Features: | ||
--------- | ||
|
||
- put to one log file from many client processes | ||
- save in binary format .tar.gz, use zcat and zgrep and for read | ||
- unlimited size of log string | ||
- rotation by date | ||
- automatic delete old logs |