Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easylogger-2.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

easylogger-2.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for easylogger-2.1.0.tar.gz
Algorithm Hash digest
SHA256 b0a39b40a1ee5084f96afecea5afb8575be40e6aa94bdb8cd64c5a1a4ae1e63f
MD5 d0e26899bd0d1eca75978dfa2eeb81d4
BLAKE2b-256 8c3b56b3ad734a04e7bc1986134174e9dee87991b1bd40d8128afb4037f13583

See more details on using hashes here.

File details

Details for the file easylogger-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for easylogger-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 395790b296beafc656ce3a861414249143d4785dfc02671655b9fb5b875474c2
MD5 0b95b885c20be40a0b4870a91ddbf08f
BLAKE2b-256 2c4aef85a40d5e2f99bf2eb05827d1d03689fa3959be892420d7e4afe854bfd2

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