Skip to main content

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

Metadata

Release files for TruLogger 1.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TruLogger 1.1.9
File Size Uploaded
TruLogger-1.1.9.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for TruLogger 1.1.9
File Interpreter ABI Platform
TruLogger-1.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / TruLogger-1.1.9.tar.gz

Download URL TruLogger-1.1.9.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
00e9c84cf778446d8e4cc8816c7d9e553dfcc51083f93fbe000b23c6d9b45e30
BLAKE2b-256 checksum
How to use checksums
8616ec7cbff3b6172910aa8fdc95bb0cd9272e79e984f80125fd91bf8a499947
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / TruLogger-1.1.9-py3-none-any.whl

Download URL TruLogger-1.1.9-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff72451bbef8a115f45672c0ac17522ee98c314d35d15e9688a838d444e59852
BLAKE2b-256 checksum
How to use checksums
6e33a5cb43e635de309b8b928725e0121600ece7b94ee476b49fe83182cf5c63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

1.1.9 This release

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page