Skip to main content

python library for event logging and application states

Project description

PyPI Version Codacy Badge Github Releases Build Status Maintainability Known Vulnerabilities License: GPL v3

logni.py

logni is a python library for event logging and application states

How to install?

  • git (github) #1
  • wget (github) #2
  • pip (python packages) #3

Install from Github #1

$ git clone https://github.com/erikni/logni.py.git
$ cd logni.py
$ sudo pip3 install -r requirements.txt
$ python3 test/example/basic_example.py

Install from Github #2

$ sudo wget -O - https://raw.githubusercontent.com/erikni/logni.py/master/setup.sh | bash

Install with PIP (Python Package Installer) #3

$ pip3 install logni
$ python3 /usr/local/lib/python3/dist-packages/logni/logni.py

Example

$ python3

>>> from logni import log

>>> log.mask('ALL')
>>> log.console(1)

>>> log.critical('critical message')
2016/04/01 22:08:18 [15489] F4: critical message [7e995d1a] {logni.py:fatal():161}

>>> log.error('error message #%s', time.time(), priority=4)
2016/04/01 22:08:18 [15489] E4: error message #1459541298.29 [58138001] {logni.py:error():164}

>>> log.warn('warning message #%s', time.time(), priority=3)
2016/04/01 22:08:18 [15489] W3: warning message #1459541298.29 [91b483ab] {logni.py:warn():167}

>>> log.info('info message #%s', time.time(), priority=2)
2016/04/01 22:08:18 [15489] I2: info message #1459541298.29 [eaf58c15] {logni.py:info():170}

>>> log.debug('debug message #%s', time.time(), priority=1)
2016/04/01 22:08:18 [15489] D1: debug message #1459541298.29 [37e911b8] {logni.py:debug():173}

Support

Logni support python >= 3.6

Roadmap

Current roadmap:

  • new integration (rollbar, logentries, sentry, ... )
  • performance improvement.

Test

test/unit

Contribution

Pull Requests are very welcome.

Licence

GNU General Public License v3.0

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

logni-0.2.3.tar.gz (20.9 kB view details)

Uploaded Source

File details

Details for the file logni-0.2.3.tar.gz.

File metadata

  • Download URL: logni-0.2.3.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for logni-0.2.3.tar.gz
Algorithm Hash digest
SHA256 d7337e73a501e4ee6be224d1724b826710743251429fc74a6e19cb989dbf64f1
MD5 b815ef830667a3ff4b25a699806fb2ed
BLAKE2b-256 e75117fe88b16ca7793daa7f93be886b277be81656e14c10473a47d05732350a

See more details on using hashes here.

Supported by

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