Skip to main content

Easy way to log data!.

Project description

outlog

Outlog it's a library to make logging a simple task!.

I'm a lazy python user, the times that i do logging on my apps it's hard to do, a lot of useless code just for print some things or saving to files
Really simple to use!

How-to Install

git clone https://github.com/zsendokame/outlog; cd outlog; pip install -e .

How-to Use

This is a little tutorial!.

Messages

import outlog

outlog.debug('DEBUG Message') # Debug Message
outlog.info('INFO Message') # Info Message
outlog.warn('WARN Message') # Warn Message
outlog.error('ERROR Message') # Error Message
outlog.critical('CRITICAL Message', 1) # Critical Message, second argument is used to know what command status code put on exit

File logging

import outlog

outlog.logger.createLogger('File.log') # Create logger and pass the filename to use
outlog.save('LOG Type', 'LOG Message') # Save logs into the file, Log type (Debug, Info, Warning and Etc...) and the log message
outlog.killLogger() # If you kill the logger, file it's automatically closed

Error catching

import outlog

@outlog.catch
def error():
    1 / 0 # Divide for 0
    
    # Do whatever you wan't, all kind of errors!

print('And i\'m still alive!')

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

Outlog-1.0.2.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file Outlog-1.0.2.tar.gz.

File metadata

  • Download URL: Outlog-1.0.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for Outlog-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e24f1aeb13521283a99da1196546b1ec8d98997c8d3bdeccd1a60b22a7c83aa4
MD5 42b923db39869d260aade31496a472a1
BLAKE2b-256 0157633a140d2102455e3339e5a3c86d0a3400cce777f1ecdb64e929699e73b0

See more details on using hashes here.

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