[yt-dev] Changing log level from within yt

Matthew Turk matthewturk at gmail.com
Wed Feb 12 11:34:01 PST 2014


On Wed, Feb 12, 2014 at 12:08 PM, John ZuHone <jzuhone at gmail.com> wrote:
> Hi all,
>
> I have an analysis module that loops over a TimeSeries object. I'd like to temporarily reduce the loglevel so that we don't see all of the stuff from loading each parameter file, and then re-set it when I'm done. I tried this before the loop:
>
> ytcfg["yt", "loglevel"] = "40"
>
> which basically does what I need it to, while still keeping the progress bar around, and then after the loop I tried setting the loglevel back to its previous value. However, this doesn't work. It only seems to work if I set the loglevel before calling yt.mods which calls the analysis module.
>
> Is there a way to temporary suppress logging info?

Yup, mylog.setLevel(40)

>
> Best,
>
> John
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org



More information about the yt-dev mailing list