You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PR#39 I mentioned hard coded file names. Specifically in the Log tab of the GUI. After reading more code it became clear that the Log section does not have direct access to the logger being used, meaning some more intricate method is likely needed to make it work properly, and wanted to raise this issue in case somebody has a better idea of how to fix it.
There appear to be a few instances of hardcoded logging file names event.log in the code, dashboard.pyL#647, L#1777, L#1808, and L#7178. This log file can be changed in the file handler in logging.yaml, and if it is changed, it would break all these functions, as that file would no longer exist, or at least not be being used for logging. Ideally this would dynamically handle the changes, allowing for the changing of the log file to work properly.
In my mind, something like this could be added to the fissure_server to dynamically give the file names of the log files in use to any requester. Then corresponding changes in the dashboard to handle this, like only getting a single item from the returned list if there was more than a single file being logged to. But not sure if that is the best option at how to resolve the issue.
defget_logging_files(self) ->list:
"""Gets all the current files the logger is logging to and returns them as a list Returns: list: List of all the files the logger is logging to """# A list that will end up getting returnedreturn_list= []
# Get each of the logging handlersforhandlerinlogger.handlers:
# Only file handlers have the baseFilename attributeifhasattr(handler, 'baseFilename'):
# So if it has that attribute, add the file to the listreturn_list.append(handler.baseFilename)
# Return the list of filesreturnreturn_list
I think this issue also effects the Pyhton3-3.8 branch as well, and a similar fix of dynamically getting the logging file name should also work there too.
The text was updated successfully, but these errors were encountered:
In PR#39 I mentioned hard coded file names. Specifically in the
Log
tab of the GUI. After reading more code it became clear that the Log section does not have direct access to the logger being used, meaning some more intricate method is likely needed to make it work properly, and wanted to raise this issue in case somebody has a better idea of how to fix it.There appear to be a few instances of hardcoded logging file names
event.log
in the code, dashboard.pyL#647, L#1777, L#1808, and L#7178. This log file can be changed in the file handler inlogging.yaml
, and if it is changed, it would break all these functions, as that file would no longer exist, or at least not be being used for logging. Ideally this would dynamically handle the changes, allowing for the changing of the log file to work properly.In my mind, something like this could be added to the fissure_server to dynamically give the file names of the log files in use to any requester. Then corresponding changes in the dashboard to handle this, like only getting a single item from the returned list if there was more than a single file being logged to. But not sure if that is the best option at how to resolve the issue.
I think this issue also effects the Pyhton3-3.8 branch as well, and a similar fix of dynamically getting the logging file name should also work there too.
The text was updated successfully, but these errors were encountered: