Skip to main content

logging stream server written on gevent

Project description

logging server written on gevent

Run log server:

from netlog import Server
Server('./logs', 5010).start()

If you don’t need blocking in .start() line: Server('./logs', 5010).start(blocking=False)

Simple way to run as daemon: python -c "import netlog; netlog.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
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 for read

  • unlimited size of log string

  • rotation by date

  • automatic delete old logs

TODO:

  • realize rotator :)

  • fetch Ctrl+C and -9 signals for flush before exit

  • udp transfer (maybe, only after v1.0)

  • implement logging.handlers.SocketHandler protocol (maybe, only after v1.0)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netlog-0.5.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file netlog-0.5.tar.gz.

File metadata

  • Download URL: netlog-0.5.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for netlog-0.5.tar.gz
Algorithm Hash digest
SHA256 58f28ad2d850171e0f8686d7d0e488fd26e15675ebed2375bf1db725f51f96e9
MD5 c3e8d6b9f3565e0914d7bb64cf0bfe08
BLAKE2b-256 ddde5bb3fc85a0c78c56b5eb5492d0b459a818f40bc986d69c66adf42d667970

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page