Skip to main content

Decorator based utility to implement Entry-Exit logs for methods

Project description

InOutLogger

Decorator based utility to implement Entry-Exit logs for methods

Getting Started

Prerequisites

python>=3.6

Installing

pip install inoutlogger

A Simple Example

from inoutlogger.utils import InOutLogger, Logger
from inoutlogger.decorators import entry_exit_log

# With Single Logger
LOGGER # Your Application Logger
logger1 = Logger(log_handler =LOGGER,  name="application_logger")

InOutLogger(logger1)

@in_out_log()
def test():
  print("Demo Single log handler")

test() # See Log file for output

# With Multiple Logger
LOGGER1 # Your Application Logger
LOGGER2 # Other Logger
logger1 = Logger(log_handler =LOGGER1,  name="application_logger")
logger2 = Logger(log_handler =LOGGER2,  name="Other")

InOutLogger([logger1, logger2])

@in_out_log(handler_name="Other")
def test():
  print("Demo Multiple log handler")

test() # See Log file for output  

License

This project is licensed under the MIT License - see the LICENSE.md file for details

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

inoutlogger-1.0.3.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

inoutlogger-1.0.3-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page