mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: do not remove log file when logging disabled
- initialization of FileLogger always removed log file - this change only removes old file when logging is enabled in current run Resolves: NEO-7199 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cdd91d64c6
commit
44273fcea0
@@ -25,7 +25,9 @@ FileLogger<globalDebugFunctionalityLevel> &fileLoggerInstance() {
|
||||
template <DebugFunctionalityLevel DebugLevel>
|
||||
FileLogger<DebugLevel>::FileLogger(std::string filename, const DebugVariables &flags) {
|
||||
logFileName = std::move(filename);
|
||||
std::remove(logFileName.c_str());
|
||||
if (enabled()) {
|
||||
std::remove(logFileName.c_str());
|
||||
}
|
||||
|
||||
dumpKernels = flags.DumpKernels.get();
|
||||
logApiCalls = flags.LogApiCalls.get();
|
||||
|
||||
Reference in New Issue
Block a user