Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contrast message from the level #34

Open
ghost opened this issue May 18, 2019 · 0 comments
Open

Contrast message from the level #34

ghost opened this issue May 18, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented May 18, 2019

Using this syntax:

import daiquiri, logging
daiquiri.setup()
z = daiquiri.getLogger()
z.warning('abcde')

I get colored output, but the level and message are colored the same. I can
work around it like this:

import daiquiri, logging
daiquiri.setup(outputs=(daiquiri.output.Stream(
   formatter=daiquiri.formatter.ColorFormatter(
      fmt="%(color)s%(levelname)s%(color_stop)s %(message)s"
   )
),))
z = daiquiri.getLogger()
z.warning('abcde')

but I think it would be better to contrast the message from the level. Other
projects color the level only:

from logzero import logger
logger.warning('abcde')

or color the message only:

import coloredlogs, logging
coloredlogs.install()
logging.warning('abcde')
@ghost ghost changed the title Contrast the message from the level Contrast message from the level May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

0 participants