On Monday, December 22, 2014, Juan Christian <juan0christ...@gmail.com <javascript:_e(%7B%7D,'cvml','juan0christ...@gmail.com');>> wrote:
> I have a 'logging' on my code using: > > import logging > < ... > > logging.basicConfig(filename="bumpr.log", level=logging.INFO) > < ... > > > The thing is that the default location of this output when running via > Windows Task Scheduler is 'C:/Windows/System32'. > > Is there a way to change the location of the output of this module? I want > it to output where my 'main.py' is. > That location is not a function of logging, it's a function of running via Windows Task Scheduler, which apparently starts the program with a current directory of C:\Windows\System32. The solution is to give logging an absolute path for the output file (which you can base of off __file__, something like """os.path.join(os.path.dirname(__file__), "bumpr.log")""") . Hope this helps, -- Zach -- Sent from Gmail Mobile _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor