mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-23 01:16:18 +00:00
Fixed issues when the watcher is set to log to /dev/null
This commit is contained in:
parent
c0d9d616c8
commit
e2cc51a0f0
@ -253,6 +253,9 @@ class SupysonicWatcher(object):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.__config.DAEMON['log_file']:
|
if self.__config.DAEMON['log_file']:
|
||||||
|
if self.__config.DAEMON['log_file'] == '/dev/null':
|
||||||
|
log_handler = logging.NullHandler()
|
||||||
|
else:
|
||||||
log_handler = TimedRotatingFileHandler(self.__config.DAEMON['log_file'], when = 'midnight')
|
log_handler = TimedRotatingFileHandler(self.__config.DAEMON['log_file'], when = 'midnight')
|
||||||
log_handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(message)s"))
|
log_handler.setFormatter(logging.Formatter("%(asctime)s [%(levelname)s] %(message)s"))
|
||||||
else:
|
else:
|
||||||
|
@ -83,7 +83,7 @@ class FolderTestCase(FrontendTestBase):
|
|||||||
with db_session:
|
with db_session:
|
||||||
folder = Folder(
|
folder = Folder(
|
||||||
name = 'folder',
|
name = 'folder',
|
||||||
path = 'tests/assets',
|
path = 'tests/assets/folder',
|
||||||
root = True,
|
root = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user