A tiny logger , make life a little easier
Project description
easylogger
easylogger is the most simple way to write your logs . just make a logs object , we can handle session counting and count logs and 6 level of importance for logs (0,5).
logs
the main method just write easylogger.logs("your file dest (default is ./log.txt)","your log name","your log details") for example a=easylogger.logs("./click.log","clicks log","here we have log of clicks from 2012")
logwrite
ogger.logs.logwrite is the only function have three parameters title ,message and degree (0,5) for example a.logwrite("file IO","all of sdcard files are corrupted")
degree
0>>trace 1>>debug 2>>info 3>>warn 4>>err 5>>fatal
Sample Code
import easylogger
a=easylogger.logs("./xapp.log","X app log","all of things happening in X app is written here")
a.logwrite("mouse move","127*148 RU",0)
a.logwrite("hello","127*148 RU",0)
a=None #simulating when app is closed
a=easylogger.logs("./xapp.log","X app log","all of things happening in X app is written here")
a.logwrite("mouse move","127*148 RU",0)
a.logwrite("hello","127*148 RU",0)
Sample Output
xapp.log:
**************** X app log ****************
----------------
all of things happening in X app is written here
----------------
================ Session:0[2018-06-15 04:00:05.612757] ================
[(0,{2018-06-15 04:00:05.612954}) trace >>> mouse move : "127*148 RU"]
[(1,{2018-06-15 04:00:05.613090}) trace >>> hello : "127*148 RU"]
================ Session:1[2018-06-15 04:00:05.613332] ================
[(0,{2018-06-15 04:00:05.613445}) trace >>> mouse move : "127*148 RU"]
[(1,{2018-06-15 04:00:05.613564}) trace >>> hello : "127*148 RU"]
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
Built Distribution
File details
Details for the file easylogger-2.1.0.tar.gz
.
File metadata
- Download URL: easylogger-2.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a39b40a1ee5084f96afecea5afb8575be40e6aa94bdb8cd64c5a1a4ae1e63f |
|
MD5 | d0e26899bd0d1eca75978dfa2eeb81d4 |
|
BLAKE2b-256 | 8c3b56b3ad734a04e7bc1986134174e9dee87991b1bd40d8128afb4037f13583 |
File details
Details for the file easylogger-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: easylogger-2.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 395790b296beafc656ce3a861414249143d4785dfc02671655b9fb5b875474c2 |
|
MD5 | 0b95b885c20be40a0b4870a91ddbf08f |
|
BLAKE2b-256 | 2c4aef85a40d5e2f99bf2eb05827d1d03689fa3959be892420d7e4afe854bfd2 |