kehr / LoggerServer

An async TCP logging server base on tornado.ioloop, which serve for logging.handlers.SocketHandler.

Home Page:http://loggerserver.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LoggerServer

An async TCP logging server base on tornado.ioloop, which serve for logging.handlers.SocketHandler.

Introduce

To solve Python separate processes logging to same file.

Official description:

Although logging is thread-safe, and logging to a single file from multiple threads in a single process is supported,
logging to a single file from multiple processes is not supported, because there is no standard way to serialize access
to a single file across multiple processes in Python. If you need to log to a single file from multiple processes, one
way of doing this is to have all the processes log to a SocketHandler, and have a separate process which implements a
socket server which reads from the socket and logs to file.

Reference: logging cookbook

LoggerServer use tornado build a high-performance TCP logging server to slove this problem.

Installl

Install LoggerServer by pip

pip install logger_server

Documentation

See LoggerServer Documentation.

About

An async TCP logging server base on tornado.ioloop, which serve for logging.handlers.SocketHandler.

http://loggerserver.readthedocs.io/

License:Apache License 2.0


Languages

Language:Python 100.0%