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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylogserver_aquanjsw-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 6b29b02ad32d0388f00c511f6bd912c2706d3a62c475b5d67ceba44429cfd16b
MD5 c62068d131d70046cff0a1b11985ce9f
BLAKE2b-256 02389b75ef584334771a780f1541431029961536d5553f006f8dce60b469d6d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylogserver_aquanjsw-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 61ef2e3e46bfe30148b1afeec101af207174abcbb547cbea19cb789224e658a6
MD5 ddcffa3c30e758245ec2d07f6042a5b6
BLAKE2b-256 35996c667b72b5551563eb11ec7f4b35bddcc2388c6750a5c375c7c93d408c6c

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