Skip to content

Inspyre-Softworks/inSPy-Logger

Repository files navigation

inSPy-Logger

GitHub Workflow Status Codacy grade GitHub release (latest by date including pre-releases) PyPI GitHub issues PyPI - Format

Installation

Prerequisites:

Platform/Env:

  • Python: ^3.6.3
  • PIP: (If you want to install via PIP, that is)

inSPy-Logger Runtime Dependencies: I am providing this list of dependencies for transparency and for instances where one would not be able to install inSPy-Logger via PyPi's package manager. It is highly recommended you use python3 -m pip install inspy_logger==<ver> to install inSPy-Logger 2.0+

Installation via Pip on Python 3.6.3+ (recommended method):

  • $> python3 -m pip install inspy_logger==<version>

Test out InspyLogger:

import inspy_logger

# Set up a log device object. The first parameter is the root loggers name, and the second is the debug level
log_device = inspy_logger.InspyLogger('LogName', 'debug')

# Start a running log from that device
log = log_device.start()

# Output our own logger lines:
log.debug('This is a debug log entry')
log.info('This is an info log entry')
log.warning('This is a warning log entry!')
log.error('This is an error log entry!')
log.exception('This is an exception log entry!')

If you run the code above you'll get output similar to this:

output1

v2.0+ repository for inSPy-Logger