A simple python logging server
Project description
pylogserver Python Package
As a companion executable to logging.handlers.SocketHandler.
Example
Start server from cmdline:
$ pip install pylogserver
$ pylogserver 9999
Listening on localhost:9999
Client side example:
#!/usr/bin/env python3
# client.py
import logging
import logging.handlers
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
socket_handler = logging.handlers.SocketHandler('localhost', 9999)
logger.addHandler(socket_handler)
logger.info('Hello, world!')
Server side output:
[2024-08-28 20:26:04,681] [root] [INFO] Hello, world!
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylogserver_aquanjsw-0.0.3.tar.gz.
File metadata
- Download URL: pylogserver_aquanjsw-0.0.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca5f592a48052f72ead57dd5c63f4819217060c4ddf38f5a8295a9950aa97dc4
|
|
| MD5 |
113e383989fb3d3da24700293cc3854a
|
|
| BLAKE2b-256 |
806c9669a4e06cd26f7f44a3a8fbf87bf08e56f818f1ac890a611b256783b00c
|
File details
Details for the file pylogserver_aquanjsw-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pylogserver_aquanjsw-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
988c2e87f518214a68a7215eed27722189f3dd254843ca8b1d63e42a2fb35b61
|
|
| MD5 |
b440d8b4290f019e73454b9fb8eaa98d
|
|
| BLAKE2b-256 |
3e7a97bc8556feda987ffda77644f24d49ebed57183709e4c82b71fbf9672d56
|