<div dir="ltr">Hi Max,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 7, 2015 at 4:30 PM, Max Katz <span dir="ltr"><<a href="mailto:maxpkatz@gmail.com" target="_blank">maxpkatz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi all,<br><div><br>A glance at the source code (utilities/logger.py) indicates to me that yt is using the Python logging package for output information, and that depending on the choice of the option stdoutStreamLogging, this can be directed to either stdout or stderr. Since there's a lot of information piped to stdout whenever a dataset is opened, and this can tend to overwhelm any other information that is being displayed to screen it would be nice if the logging output could be redirected to a file. This can be done <a href="https://docs.python.org/2/howto/logging.html" target="_blank">when setting the basicConfig for the logger</a> when setting it up, but that page indicates that this configuration cannot be overridden after it has initially been set. Is there a way to include an option in yt for the user to direct the logging output to a file of their choice?</div></div></blockquote><div><br></div><div>Not at the moment, no.  </div><div><br></div><div>Of course, you can always redirect the output of a script to a file:</div><div><br></div><div>python my_script.py > all_output 2>&1<br></div><div><br></div><div>To make it so only logging statements get redirected, and not all stdout and stderr, we could probably add a configuration option (see yt/config.py) to specify a file where logging items should be dumped to.  If you'd be interested, I think this would be a straightforward initial contribution to yt.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span class=""><font color="#888888"><br><br clear="all"><div><div><div><div dir="ltr">Max Katz<br>Department of Physics and Astronomy<br>Vice President, Graduate Student Organization<br>Stony Brook University<br><a href="http://astro.sunysb.edu/mkatz/" target="_blank">http://astro.sunysb.edu/mkatz/</a></div></div></div>
</div></font></span></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></div>