Posted: Tue Mar 20, 2012 7:51 pm Post subject: debug.log and default pytivo.conf settings
I have code in my pytivo.conf file that enables debug logging and logs it to a set path. I wonder if we should look at doing this by default out of the box unless the user overrides in their pytivo.conf. This seems to fall in line with other changes made recently that mean you don't require a pytivo.conf file to start and initially configure pytivo.
It would certainly make support easier. You just say to the user copy and paste the end of the debug.log file...
My windows installer sets this up, but it's not really being used as it hasn't been sufficiently tested. So perhaps it's something that should be included in the main code?
While we are talking about pytivo and windows. The reason people are having trouble running pytivo under program files is that log files and config files are not suppose to be stored in program files. Under vista/7 these things should be stored in programdata (the programdata variable also exists in xp). I've modified the code so that this happens if it's a windows system. Can I suggest that this code also be included while we are updating the logging settings.
Both these changes would make support and installation far easier for windows users.
Joined: 04 Jan 2008 Posts: 2622 Location: Maryland
Posted: Wed Mar 21, 2012 1:31 am Post subject:
You can specify the pathname to the config file on the command line:
python pyTivo.py -c win.conf
This feature was introduced for use with the Windows Installer. I prefer this approach over hardcoding more paths in the search list.
I do agree that something needs to be done about the logging config, it's goofy as it is. I kinda wish they hadn't designed the logging module that way.
IMHO pyTivo should probably just not be run from Program Files. I think it makes more sense to create an alternative top-level directory for it, where we can keep both a writeable pyTivo.conf and a log file. It's not entirely elegant, but then, this is Windows we're talking about. This approach is used by a number of programs that I think of as being in similar categories as pyTivo -- command-line oriented, Unix ports, etc. "Program Files" is a better fit for programs that do things the Windows way.
My development PC is still missing a hard drive so I'm flying a bit blind too. But I thought those settings I have in my pytivo.conf could easily be included as "default" settings which could create a log file. I think that would be valuable.
I'm yet to be convinced that config files should be stored in the same folder as the application. I don't think the application should be able to modify itself. But we don't need to agree on that. I'm mainly suggesting that a log file should always be created for pyTivo.
Joined: 10 Apr 2012 Posts: 16 Location: Bethesda, MD USA
Posted: Tue Apr 10, 2012 10:09 pm Post subject:
IMHO pyTivo should probably just not be run from Program Files. I think it makes more sense to create an alternative top-level directory for it, where we can keep both a writeable pyTivo.conf and a log file.
Agreed, in win7 it's pretty much not allowed for the program to be editing files in the Program Files directories. And don't assume it's going to be on the C: drive either.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum