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.4.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.4-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pylogserver_aquanjsw-0.0.4.tar.gz.

File metadata

  • Download URL: pylogserver_aquanjsw-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 96039b2e9a1b8ddc8ec1740f0a01147e266b233b7c037349c1289604a26aa12a
MD5 97b3c2f630d8d411718bf1294d6a2fbf
BLAKE2b-256 2752d1c31cda913fffb7c95c070c3d7a1017e502ee845ca0e1ed97e34fcef8ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylogserver_aquanjsw-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c5850b3e62ea606292fbc5586b8e9247ef50188e606396c1e213832e2745dadc
MD5 98dc8b27fe1d84b55c6ddb8902e19056
BLAKE2b-256 e945a918b7c85f45174341915d0db54dc99913d916f9bfb6cf022e00420c8e05

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