Skip to main content

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


Download files

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

Source Distribution

pylogserver_aquanjsw-0.0.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylogserver_aquanjsw-0.0.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

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

Hashes for pylogserver_aquanjsw-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ca5f592a48052f72ead57dd5c63f4819217060c4ddf38f5a8295a9950aa97dc4
MD5 113e383989fb3d3da24700293cc3854a
BLAKE2b-256 806c9669a4e06cd26f7f44a3a8fbf87bf08e56f818f1ac890a611b256783b00c

See more details on using hashes here.

File details

Details for the file pylogserver_aquanjsw-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pylogserver_aquanjsw-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 988c2e87f518214a68a7215eed27722189f3dd254843ca8b1d63e42a2fb35b61
MD5 b440d8b4290f019e73454b9fb8eaa98d
BLAKE2b-256 3e7a97bc8556feda987ffda77644f24d49ebed57183709e4c82b71fbf9672d56

See more details on using hashes here.

Supported by

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