mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
os.path.expanduser for logging file name
This commit is contained in:
parent
77ff57eb72
commit
766adcda50
1 changed files with 2 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue