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 .
# Or
pip install outlog
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
Release history Release notifications | RSS feed
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.3.tar.gz
(2.6 kB
view details)
File details
Details for the file Outlog-1.0.3.tar.gz
.
File metadata
- Download URL: Outlog-1.0.3.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b0901060dd370aeed4a6dc96da83dcb466fbc28b0793b248929da9593ab43d2 |
|
MD5 | 94dc94412b02fb5fba14fe22b427420c |
|
BLAKE2b-256 | 40829bc63280dcd2305154224d97f5817cc0b925b6f16d0a37a6360a159e1f32 |