Skip to content

Commit

Permalink
Merge pull request #105 from VitaliStupin/logger-handler-fix
Browse files Browse the repository at this point in the history
Fix duplicate logging
  • Loading branch information
melbeltagy authored May 21, 2024
2 parents 3a826e2 + 9f0c807 commit a3d181a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion analysis_module/opmon_analyzer/logger_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _create_file_handler(self):

def _handler_is_set(self, handlers):
for handler in handlers:
if handler is WatchedFileHandler and os.path.abspath(self.log_path) == handler.baseFilename:
if isinstance(handler, WatchedFileHandler) and os.path.abspath(self.log_path) == handler.baseFilename:
return True
return False

Expand Down
2 changes: 1 addition & 1 deletion analysis_ui_module/opmon_analyzer_ui/logger_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _create_file_handler(self):

def _handler_is_set(self, handlers):
for handler in handlers:
if handler is WatchedFileHandler and os.path.abspath(self.log_path) == handler.baseFilename:
if isinstance(handler, WatchedFileHandler) and os.path.abspath(self.log_path) == handler.baseFilename:
return True
return False

Expand Down
2 changes: 1 addition & 1 deletion anonymizer_module/opmon_anonymizer/utils/logger_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _create_file_handler(self):

def _handler_is_set(self, handlers):
for handler in handlers:
if handler is WatchedFileHandler and os.path.abspath(self.log_path) == handler.baseFilename:
if isinstance(handler, WatchedFileHandler) and os.path.abspath(self.log_path) == handler.baseFilename:
return True
return False

Expand Down
2 changes: 1 addition & 1 deletion collector_module/opmon_collector/logger_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _create_file_handler(self):

def _handler_is_set(self, handlers):
for handler in handlers:
if handler is WatchedFileHandler and os.path.abspath(self.log_path) == handler.baseFilename:
if isinstance(handler, WatchedFileHandler) and os.path.abspath(self.log_path) == handler.baseFilename:
return True
return False

Expand Down
2 changes: 1 addition & 1 deletion corrector_module/opmon_corrector/logger_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _create_file_handler(self):

def _handler_is_set(self, handlers):
for handler in handlers:
if handler is WatchedFileHandler and os.path.abspath(self.log_path) == handler.baseFilename:
if isinstance(handler, WatchedFileHandler) and os.path.abspath(self.log_path) == handler.baseFilename:
return True
return False

Expand Down
2 changes: 1 addition & 1 deletion reports_module/opmon_reports/logger_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _create_file_handler(self):

def _handler_is_set(self, handlers):
for handler in handlers:
if handler is WatchedFileHandler and os.path.abspath(self.log_path) == handler.baseFilename:
if isinstance(handler, WatchedFileHandler) and os.path.abspath(self.log_path) == handler.baseFilename:
return True
return False

Expand Down

0 comments on commit a3d181a

Please sign in to comment.