Skip to content

Commit 9fbdc49

Browse files
committed
debug log file can be stdout
1 parent 7a6f07c commit 9fbdc49

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/Alf.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ class Alf : public AliceO2::Common::Program
108108
maxFiles = static_cast<unsigned int>(std::stoul(mOptions.dimLogFileConfig.substr(start)));
109109
}
110110
}
111-
alfDebugLog.setLogFile(path.c_str(), maxBytes, maxFiles, 1);
111+
const char* debugLogFile = path.c_str();
112+
if (path == "stdout") debugLogFile = NULL; // handle special string to set logs go to stdout
113+
alfDebugLog.setLogFile(debugLogFile, maxBytes, maxFiles, 1);
112114
alfDebugLog.setOutputFormat(SimpleLog::FormatOption::ShowTimeStamp | SimpleLog::FormatOption::ShowSeveritySymbol | SimpleLog::FormatOption::ShowMessage );
113115
alfDebugLog.info("ALF starting");
114116
} else {

0 commit comments

Comments
 (0)