https://github.com/schmichael/gologd
Stupid simple log multiplexer written in go
https://github.com/schmichael/gologd
Last synced: 30 days ago
JSON representation
Stupid simple log multiplexer written in go
- Host: GitHub
- URL: https://github.com/schmichael/gologd
- Owner: schmichael
- License: other
- Created: 2011-11-19T22:05:23.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-07-28T00:09:55.000Z (almost 14 years ago)
- Last Synced: 2025-01-26T00:12:50.558Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 117 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
gologd
======
A simple multiplexer: multiple writers send messages via a Unix Domain Socket
which gologd writes to a log file.
*Warning:* Seems to only work in Linux despite OSX's socket manpage mentioning
SOCK_SEQPACKET.
*Warning:* It's stupid slow right now (approx. 3x slower than a Python version
that does more) and meant to be a learning experience.
python_logd.py
==============
The original multiplexing logger implementation written in Python. To use make
sure you have the Python tool "virtualenv" installed on your system:
virtualenv .
. bin/activate
pip install mmstats
python python_logd.py python_logd.ini
punish_logd.py
==============
Simple script to connect to the socket created by either logging daemon
implementation and throw sample log messages at it. No dependencies should be
required other than Python 2.6+.
# Fork 2 processes and have each send 10k messages to golog.sock
python punish_logd.py 2 10000 golog.sock
# Fork 3 processes, each sends 10k messages, and send SIGHUP a few times
python punish_logd.py 3 10000 python_log.sock $(cat python_logd.pid)