Skip to content
Snippets Groups Projects
Commit 459d9303 authored by lukas leufen's avatar lukas leufen
Browse files

logs now error message

parent 00acb7bd
No related branches found
No related tags found
3 merge requests!90WIP: new release update,!89Resolve "release branch / CI on gpu",!80Resolve "improve run environment for error handling"
Pipeline #32756 passed
...@@ -242,6 +242,8 @@ class Logger: ...@@ -242,6 +242,8 @@ class Logger:
filemode='a') filemode='a')
# add stream handler to the root logger # add stream handler to the root logger
logging.getLogger('').addHandler(self.logger_console(level_stream)) logging.getLogger('').addHandler(self.logger_console(level_stream))
# print logger path
logging.info(f"File logger: {self.log_file}")
@staticmethod @staticmethod
def setup_logging_path(path: str = None): def setup_logging_path(path: str = None):
......
...@@ -50,6 +50,8 @@ class RunEnvironment(object): ...@@ -50,6 +50,8 @@ class RunEnvironment(object):
return self return self
def __exit__(self, exc_type, exc_val, exc_tb): def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type:
logging.error(exc_val, exc_info=(exc_type, exc_val, exc_tb))
self.__del__() self.__del__()
@staticmethod @staticmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment