Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loggers

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loggers

Usefull wrapper methods for logging native package

  • 0.1.4
  • PyPI
  • Socket score

Maintainers
1

.. image:: https://travis-ci.org/jonDel/loggers.svg?branch=master :target: https://travis-ci.org/jonDel/loggers :alt: Travis CI build status (Linux)

.. image:: https://coveralls.io/repos/github/jonDel/loggers/badge.svg?branch=master :target: https://coveralls.io/github/jonDel/loggers?branch=master

.. image:: https://readthedocs.org/projects/loggers/badge/?version=master :target: http://loggers.readthedocs.io/en/latest/?badge=master :alt: Documentation Status

.. image:: https://landscape.io/github/jonDel/loggers/master/landscape.svg?style=flat :target: https://landscape.io/github/jonDel/loggers/master :alt: Code Health

.. image:: https://img.shields.io/pypi/v/loggers.svg :target: https://pypi.python.org/pypi/loggers/ :alt: Latest PyPI version

loggers

loggers is a Python library that provides usefull wrapper methods for logging class. To be used as a superclass for your own classes.

Example

.. code:: python

from loggers import Loggers

class spamClass(Loggers): ... def init(self, log_folder=None): ... super(spamClass, self).init('spamClass', log_folder_path=log_folder) ... def do_stuff(self, arg): ... if not type(arg) == str: ... self.log.error("I was expecting a string. :( ") ... else: ... self.log.debug("I received my string. :)") ... spam = spamClass('/tmp/logs/spamClass') spam.log.error('ERROR') Log: ERROR | Log level:ERROR | Date:31/10/2016 16:51:47 spam.set_log_rotate_handler(True) spam.do_stuff(123) Log: I was expecting a string. :( | Log level:ERROR | Date:31/10/2016 16:51:47 spam.do_stuff('Eggs') spam.set_log_level('DEBUG') Log: Changing log level to DEBUG | Log level:DEBUG | Date:31/10/2016 16:51:47 spam.do_stuff('Spam') Log: I received my string. :) | Log level:DEBUG | Date:31/10/2016 16:51:47

Installation

To install loggers, simply run:

::

$ pip install loggers

loggers is compatible with Python 2.6+ and Python 3

Documentation

https://loggers.readthedocs.io

Source Code

Feel free to fork, evaluate and contribute to this project.

Source: https://github.com/jonDel/loggers

License

GPLv3 licensed.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc