Skip to main content

Loghandler

Project description

Logging Module

This library can handle colored log-output and write directly into a logfile.

Init

#!/usr/bin/env python3

from logbuddy import logbuddy

log = logbuddy.log()

Loglevel

At the moment there are a few loglevels defined by default.

  • Info
  • Warning
  • Error
  • Pass
  • Debug
log.Pass("I am a pass-message")
log.Warn("I am a warning-message")
log.Error("I am an error-message")
log.Debug("I am a debug-message")
log.Info("I am an info-message")

Change the color of the levels

log.Info("I am an info-message")

log.setInfo("\x1b[1;36m")

log.Info("And now I have a different color")

If you don't like colors

log.setColor(False)

Need a logfile?

log.setLogfile("somelogfile")

Need a logfile with date?

log.setLogfile("somelogfile")
log.setLogfileDate(True)

Future Plans

  • Creating your own loglevels

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

logbuddy-0.0.1.7.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logbuddy-0.0.1.7-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file logbuddy-0.0.1.7.tar.gz.

File metadata

  • Download URL: logbuddy-0.0.1.7.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for logbuddy-0.0.1.7.tar.gz
Algorithm Hash digest
SHA256 c0500c600dbedcdfee339a65f4ff9112d9980fc37a0de799abeb407f1b8a8ae2
MD5 e818fb2c8544fd9963912427df92fa56
BLAKE2b-256 5185b2798bc8dab79c76713a0d9960f203b474b5fd1ba1bf4b012e0da46ad2cd

See more details on using hashes here.

File details

Details for the file logbuddy-0.0.1.7-py3-none-any.whl.

File metadata

  • Download URL: logbuddy-0.0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for logbuddy-0.0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 aec0fce748a4b44bf97dcdc7a03470bba0acff785795666a21e015b4794430e2
MD5 82b3d7aab49fea0fe354738c55bc7b3d
BLAKE2b-256 5fafe17e8565f131ffe85f3b8ae174a61032396fccfa20141d518b9e8941178a

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