scottrice / Ice

Application to automatically add ROMs to Steam
http://scottrice.github.io/Ice/
MIT License
835 stars 96 forks source link

Can't change the location of log file to own home directory on Debian #336

Closed sharkwouter closed 8 years ago

sharkwouter commented 8 years ago

I've been doing some customization of Ice for packaging for SteamOS/Debian. For this I have to change the locations of the log files. Moving the error log works like expected when changing it in the main, but the ice.log is a different story.

In ice_logging.py setting the filename used by class IceLogger to /tmp/ice.log works great, but when you set it to /home/user/ice.log it will convert it into ~/ice.log for some reason. At some point within logger os.path.abspath(filename) is run, which will convert this into /home/user/~/ice.log if your working directory is /home/user.

I'm not sure why this conversion happens, maybe someone here does. I'm still looking into it, but it looks like I may just have to log to /tmp.

sharkwouter commented 8 years ago

I found a workaround. you can use os.environ['HOME'].