ISEPOS-2280 Added fallback paths for base loggers

This commit is contained in:
2024-10-15 11:55:59 +02:00
parent 0d0285a296
commit 13e4fa808f
3 changed files with 22 additions and 11 deletions

View File

@@ -63,7 +63,11 @@ classdef base_logger < handle
methods(Access=private)
function this = base_logger()
this.fid = fopen(getenv("APP_LOG_FILE"), 'a');
logFileName = getenv("APP_LOG_FILE");
if isempty(logFileName)
logFileName = 'fallbackPathApplication.log';
end
this.fid = fopen(logFileName, 'a');
if this.fid == -1
error('Failed to open log file');
end