Skip to content

Commit

Permalink
Add usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
drkostas committed Dec 15, 2021
1 parent 0f5ff18 commit a87f163
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# pip install termcolor-logger
from termcolor_logger import ColorLogger

fancy_logger = ColorLogger(logger_name='FancyMain',
color='blue',
on_color='on_red',
attrs=['underline', 'reverse', 'bold'])

ColorLogger.setup_logger(log_path="hi.log", debug=True, clear_log=True)

fancy_logger.info("You can customize the logger like this")
fancy_logger.info("You can customize each log message differently",
color="green", on_color="on_white", attrs=[])

0 comments on commit a87f163

Please sign in to comment.