Skip to content

Commit

Permalink
move diyhue.log
Browse files Browse the repository at this point in the history
  • Loading branch information
hendriksen-mark committed Jun 9, 2024
1 parent 9ddec69 commit c143496
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions BridgeEmulator/configManager/configHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def download_config(self):

def download_log(self):
subprocess.run('tar -cvf ' + self.configDir + '/diyhue_log.tar ' +
self.configDir + '/*.log* ',
self.configDir.replace('/config', '') + '/*.log* ',
shell=True, capture_output=True, text=True)
return self.configDir + "/diyhue_log.tar"

Expand All @@ -314,7 +314,7 @@ def download_debug(self):
_write_yaml(self.configDir + "/system_info.yaml", info)
subprocess.run('tar --exclude=' + "'config.yaml'" + ' -cvf ' + self.configDir + '/config_debug.tar ' +
self.configDir + '/*.yaml ' +
self.configDir + '/*.log* ',
self.configDir.replace('/config', '') + '/*.log* ',
shell=True, capture_output=True, text=True)
os.popen('rm -r ' + self.configDir + '/config_debug.yaml')
return self.configDir + "/config_debug.tar"
Expand Down
2 changes: 1 addition & 1 deletion BridgeEmulator/logManager/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _setup_logger(self, name):
handler.setLevel(logging.WARNING)
logger.addHandler(handler)

handler = logging.handlers.RotatingFileHandler(filename='config/diyhue.log', maxBytes=(10000000), backupCount=7)
handler = logging.handlers.RotatingFileHandler(filename='diyhue.log', maxBytes=(10000000), backupCount=7)
handler.setFormatter(_get_log_format())
handler.setLevel(logging.DEBUG)
handler.addFilter(lambda record: record.levelno <= logging.CRITICAL)
Expand Down

0 comments on commit c143496

Please sign in to comment.