AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ Log() [1/2]

void drama::logging::Logger::Log ( const IMP_AbsTime time,
unsigned  level,
bool  nofmt,
const char prefix,
const char fmt,
  ... 
)

Log a message with a specified event time.

Explictly log a message, but use the specified time rather then the current time. This allows a scheme which is buffering log messages to ensure the correct time is assoicated with the message.

You should be warned that this message will likely appear out of order with the normal log messages. You may need to sort your log file on the time fields to account for this. To help in identifing such lines - the colon (:) at the end of the time string is replaced by a plus sign (+).

Parameters
timeThe time to associate with the log message. This is an IMP Time structure. You can use routines like ImpTimeNow() to construct these.
levelThe logging level. One of the D2LOG_ macro values
nofmtIf true, don't format the message, presume it is already formated. (improves efficiency for cases where we know that no formatting is needed.
prefixA prefix to the log message, often indicting the function which makes the call.
fmtC printf style format statement, unless nofmt is true, in which case it is just a string to output.
...If nofmt is false, then the arguments to the format.