mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
refactor: use virtualFileSystem in FileLogger ULTs
restored the possibility of different writing modes in the FileLogger mocked writeToFile in TestFileLogger Related-To: NEO-7006 Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6d96572c2c
commit
ee0648c365
@@ -45,7 +45,11 @@ FileLogger<debugLevel>::~FileLogger() = default;
|
||||
template <DebugFunctionalityLevel debugLevel>
|
||||
void FileLogger<debugLevel>::writeToFile(std::string filename, const char *str, size_t length, std::ios_base::openmode mode) {
|
||||
std::lock_guard theLock(mutex);
|
||||
writeDataToFile(filename.c_str(), str, length);
|
||||
std::ofstream outFile(filename, mode);
|
||||
if (outFile.is_open()) {
|
||||
outFile.write(str, length);
|
||||
outFile.close();
|
||||
}
|
||||
}
|
||||
|
||||
template <DebugFunctionalityLevel debugLevel>
|
||||
|
||||
Reference in New Issue
Block a user