os.path.expanduser for logging file name

This commit is contained in:
System User 2010-12-02 16:57:02 +01:00
parent 77ff57eb72
commit 766adcda50

View File

@ -2,6 +2,7 @@
import sys
import logging
import os
from radicale import config
@ -16,7 +17,7 @@ level=LEVELS.get(config.get("logging", "level"), logging.NOTSET)
logger=logging.getLogger("radicale")
logger.setLevel(level=level)
handler=logging.FileHandler(config.get("logging", "file"))
handler=logging.FileHandler(os.path.expanduser(config.get("logging", "file")))
handler.setLevel(level=level)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")