Skip to content

Need of ic.debug(**kwargs), ic.info(**kwargs) like methods to lib to increase production usage #188

@UlucFVardar

Description

@UlucFVardar

ic is a great library,
but I think it has one shortcoming.

When using it in a big project, it becomes critical to perform the print operation according to the logging level.

In my current codes, there is always a code add-on like the one below.

if os.environ.get('LOGGING_LEVEL', 'INFO') == 'DEBUG':
    ic(MY_VALUE)

This is a big need to be added to the library!

from icecream import ic
ic.debug()
ic.info()
ic.warning()
ic()

OR

from icecream import ic_error
from icecream import ic_warning
from icecream import ic_debug
from icecream import ic_info
from icecream import ic
ic_debug()
ic_info()
ic_warning()
ic()

Using it like this will be very useful in projects.

Also, if the colors printed according to the logging level are changed, we will have a much more understandable print style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions