项目作者: deadlyedge

项目描述 :
a fast, no dependencies log colorizer. with style formatter.
高级语言: Python
项目地址: git://github.com/deadlyedge/xlogger.git
创建时间: 2020-04-23T08:36:11Z
项目社区:https://github.com/deadlyedge/xlogger

开源协议:MIT License

下载


Something about xlogger

I’m a python starter, when I learn the logging section,
I thought that writing the logging format is so ‘non-python’,
and I have to write the same ‘anti-human’ codes every where.
Logs are important and should be used more. And in more simple way.

So I checked StackOverflow for some inspiration, and I actually learned some.

Here is the module I made, in fact, it’s the first one I wrote that should be
shared at pypi I thought.

Hope you guys enjoy it:)

Usage

just copy the code, it have no dependencies. this is the way recommended,
because you can make your own logger customized easily by setting some variables.

or if you want to install

  1. pip3 install xlogger

then add lines to your code:

  1. from xlogger import xlogger
  2. logger = xlogger.get_my_logger(__name__)

and then just use logger as usual.

Main references

‘How can I color Python logging output?’

https://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output

Thank

Sergey Pleshakov - my code base on your code.