An application log system similar to Android Logcat for Python
PyLogcat is an application log system similar to Android Logcat for Python.
PyLogcat currently supports the following log levels.
- Error : Critical messages which can cause application malfunction
- Warning : Priority messages which indicate the potential problem in application
- Information : Proirity messages which help users tracing application execution
- Verbose : Debug messages which help developers debugging application under development
pip install pylogcat
from pylogcat import Log, Level
Log module privodes main functions for application log.
Level enumerates supported log levels as v, i, w, and e for verbose, informatin, warning, and error messages.
Setup log level
Log level is set as verbose which means all messages will be shown. Users can set log level as error, warning, information, or verbose as required. For example, users can set log level as information by adding the following line of code
Log.level = Level.i
Create log message
Verbose log message
Log messages will be shown only if log level is set as v.
Information log message
Log messages will be shown only if log level is set as v or i.
Warning log message
Log messages will be shown only if log level is set as v, i, or w.
Error log message
Log messages will be shown no matter what log level is set.
PyLogcat can only print log messages on console now.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.