Skip to main content

Simple logging module run on process with python logging

Project description

how to use

from process-logging import Logger

logger = Logger()
log_fime_name = "{:%Y-%m-%d}_info.log".format(datetime.now())
log_path = "./logs/"
trf_handler_args = {"filename": log_path + log_fime_name,
                    "when": "midnight",
                    "interval": 1,
                    "encoding": "utf-8"}
format_def = ("[%(levelname)s] | %(process)d | %(asctime)s | %(message)s", "%Y-%m-%d %H:%M:%S")
handler_def = {HandlerType.StreamHandler: {}, HandlerType.TimedRotateFileHandler: trf_handler_args}

if __name__ == "__main__":
    logger.set_logger(name="logger", level=logging.INFO, handler_def=handler_def, format_def=format_def)

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

process-logging-0.1.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

process_logging-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file process-logging-0.1.0.tar.gz.

File metadata

  • Download URL: process-logging-0.1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for process-logging-0.1.0.tar.gz
Algorithm Hash digest
SHA256 775ca73b570aac972f90cdbd6d4fe1a0fa2550e259971d80768d4559c3920f33
MD5 34046d4f1d534e5945aad6f1b24b3364
BLAKE2b-256 281685c2786bbd7dd7fe1cadd0203b1e461387dc51b97819b730a337dee2d445

See more details on using hashes here.

File details

Details for the file process_logging-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for process_logging-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52cd0095f36a0cfefbe3125c7302256b3551b2bdabc22939a9e5547bcd255b8c
MD5 999b5a9a18af6512058649de088d847c
BLAKE2b-256 aa00373d13a3f5f597a3f141ab62ce0502015e5f8828c5080e7a67f60e57a025

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