|
AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
|
inline |
Log a message sing with fmt::format string formatting and also output to a stream.
Explicitly log a message. Type Safe formatting. Also output the message to a stream.
See DRAMA 2 String formatting for details on this formatting approach.
Since the result of the formatting is easily output to a stream, this override of LogF() takes an ostream argument and also outputs the message there.
One typical use of this method would be in a development process where you want messages to go to std::err/stdout for debugging/development, but when completed, you want them only in the log file. It is easy to then just find all occurrences of LogF() in the file and remove the first argument, so that it just goes to the log file.
A second typical use is where an error has occurred, and you want to write the message both to the log file and to say std::err.
| ostream | The stream to also output the message to. A new-line is also output after the message. |
| level | The logging level. One of the D2LOG_ macro values |
| prefix | A prefix to the log message, often indicting the function which makes the call. |
| fmt | The string for formatting. See fmt::format for details. |
| args | Arguments to the format. See fmt::format for details. |
| Args... | the remaining argument types. |
References drama::CreateRunDramaTask(), and LogNF().