[yt-dev] Issue #1285: Yt loglevel: Many methods, why only one working? (yt_analysis/yt)

scott_feister issues-reply at bitbucket.org
Wed Sep 28 08:37:56 PDT 2016


New issue 1285: Yt loglevel: Many methods, why only one working?
https://bitbucket.org/yt_analysis/yt/issues/1285/yt-loglevel-many-methods-why-only-one

scott_feister:

There are several methods noted in the yt documentation that one can change the log level. The duplicated documentation is a problem for another day (that I may attempt to address, even), but not the subject of this bug report. Here is the relevant documentation:

http://yt-project.org/doc/reference/configuration.html
http://yt-project.org/doc/faq/index.html#how-can-i-change-yt-s-log-level

And here are the methods:

Method 1. From text editor: edit $HOME/.yt file to read:

```
[yt]
loglevel = 50
```

Method 2. From command line, call your script "my_script.py" that includes yt analysis:
```
$ python2.7 my_script.py --config loglevel=50
```
Method 3. Within python:
```
>> yt.funcs.mylog.setLevel(50)
```
Method 4. Within python:

```
>> yt.config.ytcfg[“yt”, “loglevel”] = “50”
```

Method 5. Within python:

```
>> yt.config.ytcfg.set(“yt”, “loglevel”, “50”)
```

Method 6. Within python:

```
>> from yt.config import ytcfg
>> ytcfg[ …. # (variant on methods 4 and 5)
```


While trying to change the log level, I learned about and tried them all, but only method 4 worked. The others leave the "[INFO]" messages on.

Scott




More information about the yt-dev mailing list