Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 546 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 546 Bytes

rlogger

A convenient encapsulation of Python logging

Install

pip install rlogger

Use

from rlogger import RLogger
# Set log file path
RLogger.init('file.log', enable_screen=True, log_level='INFO', max_bytes=1e8, backup_count=1)
RLogger.log('your message', RLogger.INFO)
RLogger.log('your message', RLogger.DEBUG)
RLogger.log('your message', RLogger.WARNING)
RLogger.log('your message', RLogger.ERROR)
# Close log when you not need
RLogger.close()
RLogger.log('your message', RLogger.ERROR) # Will not print