python - Save log files in the user home directory -


i have logging.conf [1] file configure logging in python application.

... [handler_file_log_handler] class=logging.handlers.timedrotatingfilehandler level=info formatter=simple args=('/var/log/myapp/myapp.log',) 

as can see, i'm storing log file in /var/log/myapp directory.

what store in user (the user manages application) home directory (/home/myuser/.myapp/log). so, question is:

what should configure in logging.conf in order able save log file of python application in user home directory?

[1] - https://docs.python.org/2.6/library/logging.html#configuring-logging

the user's home directory can found (on os) using:

os.path.expanduser("~") 

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -