You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because the format must also include color markups like "<green></green>" or "<red></red>" for example. See documentation here: The color markups.
Also, you may take a look at this: Why are my logs not colored?.
The following code should work:
importsysfromloguruimportloggerlogger.remove(0)
logger.add(sys.stdout, colorize=True, format='<green>{time}</> <level>{message}</>')
logger.info('this is a message')
Doesn't actually print with colors (specificly when also using
foarmt
flag)The text was updated successfully, but these errors were encountered: