A Python logging wrapper with some of logging settings configured.
-
Log file name and directory to store logs.
-
Allow the log file to rollover at a predetermined size.
-
Two log outputs:
-
console: coding debug
-
file: application running log collection
-
-
Console log output shows logs which belongs to level DEBUG and above.
-
File log output stores logs which belongs to level INFO and above.
- Download HWLogging
git clone https://github.com/henrywang/hwlogging.git
- Import HWLogging
import hwlogging
if __name__ == "__main__":
logger = hwlogging.Logger(__file__).logger
logger.info("Working on file {0}.".format(__file__))