11
how to send the icecream output to a log file? [solved]
(lemmy.eco.br)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
If you're talking about the package icecream, there's "ic.format()" that returns a string you can log, instead of printing directly to standard out.
More generically, you can have pythons logger capture all of standard out, but that's kind of a shotgun approach, and depending on what your doing, may have some side effects you don't want.