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

Quick and dirty logging with ic() - minor feature extension #207

Open
kscaec opened this issue Jan 29, 2025 · 0 comments
Open

Quick and dirty logging with ic() - minor feature extension #207

kscaec opened this issue Jan 29, 2025 · 0 comments

Comments

@kscaec
Copy link

kscaec commented Jan 29, 2025

@gruns: First of all, thank you for writing and maintaining ic. It is one of the best utilities I have a come across :-)

I wanted to add more detailed logging to ic, hit some snags (--I don't understand enough about call stacks--), but finally found an easy solution.

I defined functions icd (for DEBUG), ici (INFO), icw (WARNING), ice (ERROR) and ic (CRITICAL) based on Python's logging module and ic.

You call them just like you would call ic. They add a time stamp and the logging level to ic's output, and duplicate the output to a log file.

In case someone would like to use them, they can be found at https://github.com/kscaec/ks_util . (I am a novice GitHub user, so let me know if there is an issue.)

  • A word of caution: I do not plan on evolving these functions going forward. I am not professional enough as a developer to embark on this.

@gruns: If you find my logging variants of ic() of interest, feel free to re-use them and integrate them into icecream. (Or not, of course ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant