Skip to main content

Simple Timed Logger

It's logging package for very basic log messages.

It has 5 levels of logs (DEBUG, INFO, WARNING, ERROR, CRITICAL). By using unique keys, it is possible to measure elapsed time between 2 log messages

Logging is done by these methods:

  • log()
  • debug()
  • info()
  • warning()
  • error()
  • critical()

log() method can be set to log message on any level.

All logging methods take these keyword arguments:

  • timed - (True/False) Is log message timed
  • key - Unique key for timed log message. Use this key to stop logging and print out elapsed time.

If key is not provided for timed logging, it will be automatically generated. To stop timed logging, use stop_timed_log() method. By passing key of log timer you want to stop. If no key is given, it will stop last started timed log.

using basic_config() it is possible to configure what lowest level of log messages will be printed to terminal

Exaple of usage:

from simpleTimedLogger import SimpleTimedLogger # Import logger to file

logger = SimpleTimedLogger.Logger() # Create instance of a logger class
logger.basic_config(min_level_of_logging=logger.DEBUG) # Set minimum level of messages to be printed in terminal

logger.debug("This prints message to terminal as debug message")

logger.start_timed_log("This starts timed log and prints message to terminal")
logger.end_timed_log("This ends timed log and prints message to terminal and shows elapsed time")

logger.start_timed_log("You can also provide your own key and message level", level=logger.ERROR, key='function name')
logger.end_timed_log('You can also end timed log based on key', key='function name')

logger.log(msg='You can start timed logs this way too', timed=True, level=logger.INFO)
logger.end_timed_log('When key not provided, it ends last started timed log')

Release files for SimpleTimedLogger 2.0.2

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

Source distribution (sdist)

Source distribution for SimpleTimedLogger 2.0.2
File Size Uploaded
simpletimedlogger-2.0.2.tar.gz 18.7 kB Details

Built distribution (wheel)

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

Total release size:35.4 kB

Release files / simpletimedlogger-2.0.2.tar.gz

Download URL simpletimedlogger-2.0.2.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
53e7f9b7ebce1e8062de5b4d28a1aa24230ed694fe0b1bf20c65bf8436991f73
BLAKE2b-256 checksum
How to use checksums
5d4bd48d80d3d7b0fbb51cd3bb27653dc33ca91569434099ebd90fd764040741
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / simpletimedlogger-2.0.2-py3-none-any.whl

Download URL simpletimedlogger-2.0.2-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
179d1c9485fa0c4c47bdb362da5cad6b34a8a6828632b71a76b0c80bc31b58b8
BLAKE2b-256 checksum
How to use checksums
17154f64d4e7d36397d0f0db5bd6096a937ba07d5804254b13e919c80280d59b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

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