Skip to main content

No project description provided

Project description

Upload Python Package

TruLogger

A simple python log library

Installation

Install via pip

pip install TruLogger

Usage

Here are some simple examples of usage:

import trulogger


logger = trulogger.TruLogger({'verbose': True})

# define a custom prefix
logger.set_prefix("custom prefix")

logger.info("This is info")
# [ 2022-10-22 16:37:02 ]	[ INFO ] custom prefix	This is info
logger.error("This is error")
# [ 2022-10-22 16:37:02 ]	[ ERROR ] custom prefix	This is error
logger.warning("This is warning")
# [ 2022-10-22 16:37:02 ]	[ WARNING ] custom prefix	This is warning
logger.debug("This is debug")
# [ 2022-10-22 16:37:02 ]	[ DEBUG ] custom prefix	This is debug
logger.success("This is success")
# [ 2022-10-22 16:37:02 ]	[ SUCCESS ] custom prefix	This is success

logger.add_to_log("This is a simple add")
# This is a simple add

# Create a new logger with traceback included
logger2 = trulogger.TruLogger({'verbose': True, 'traceback': True})

logger2.set_prefix("custom prefix")

logger2.info("This is info")
# [ 2022-10-22 16:37:02 ]	[ INFO ] custom prefix	This is info

# clear the custom prefix
logger2.reset_prefix()
logger2.error("This is error")
# [ 2022-10-22 16:37:02 ]	[ ERROR ]	This is error
# [<FrameSummary file /Users/jacobtruman/workspace/personal/TruLogger/tests.py, line 22 in <module>>, <FrameSummary file /Users/jacobtruman/workspace/personal/TruLogger/trulogger/__init__.py, line 93 in error>]
logger2.warning("This is warning")
# [ 2022-10-22 16:37:02 ]	[ WARNING ]	This is warning
logger2.debug("This is debug")
# [ 2022-10-22 16:37:02 ]	[ DEBUG ]	This is debug
logger2.success("This is success")
# [ 2022-10-22 16:37:02 ]	[ SUCCESS ]	This is success

logger2.add_to_log("This is a simple add")
# This is a simple add

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

TruLogger-1.1.7.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

TruLogger-1.1.7-py3-none-any.whl (1.7 kB view details)

Uploaded Python 3

File details

Details for the file TruLogger-1.1.7.tar.gz.

File metadata

  • Download URL: TruLogger-1.1.7.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for TruLogger-1.1.7.tar.gz
Algorithm Hash digest
SHA256 e97bda551bc13995c4ce834e76f87b8b33e138d077076bc5f9a0563624138954
MD5 34e1d6ba435a19164218b420d534be5c
BLAKE2b-256 609f7bbf603ceb8d9c8697e25946365f34998943d7f00344c93da7f7334da5b2

See more details on using hashes here.

File details

Details for the file TruLogger-1.1.7-py3-none-any.whl.

File metadata

  • Download URL: TruLogger-1.1.7-py3-none-any.whl
  • Upload date:
  • Size: 1.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for TruLogger-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 afd7767433d0c6008e8d7fe9c0e89856c2363a3d249aa959b789c6bdf31c2e24
MD5 b299917c54f24ecf83f778afd81d55bb
BLAKE2b-256 d60567c872d2383e4f427ad8cc831f824a1f71000d7e73361969697b4e8043d6

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