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.9.tar.gz (2.9 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.9-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: TruLogger-1.1.9.tar.gz
  • Upload date:
  • Size: 2.9 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.9.tar.gz
Algorithm Hash digest
SHA256 00e9c84cf778446d8e4cc8816c7d9e553dfcc51083f93fbe000b23c6d9b45e30
MD5 33a686a0f5f07c65a31e21a0ce2aa1f1
BLAKE2b-256 8616ec7cbff3b6172910aa8fdc95bb0cd9272e79e984f80125fd91bf8a499947

See more details on using hashes here.

File details

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

File metadata

  • Download URL: TruLogger-1.1.9-py3-none-any.whl
  • Upload date:
  • Size: 2.9 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ff72451bbef8a115f45672c0ac17522ee98c314d35d15e9688a838d444e59852
MD5 e35385483e8a5f85e8c1b3a05d27a4f3
BLAKE2b-256 6e33a5cb43e635de309b8b928725e0121600ece7b94ee476b49fe83182cf5c63

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