本文整理汇总了C++中LogMessage::timestamp方法的典型用法代码示例。如果您正苦于以下问题:C++ LogMessage::timestamp方法的具体用法?C++ LogMessage::timestamp怎么用?C++ LogMessage::timestamp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogMessage
的用法示例。
在下文中一共展示了LogMessage::timestamp方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fatalExceptionToString
// helper for fatal exception (windows only)
std::string fatalExceptionToString(const LogMessage& msg) {
std::string out; // clear any previous text and formatting
out.append("\n" + msg.timestamp()
+ "\n\n***** FATAL EXCEPTION RECEIVED ******* \n"
+ '"' + msg.message() + '"');
return out;
}
示例2: fatalSignalToString
// helper for fatal signal
std::string fatalSignalToString(const LogMessage& msg) {
std::string out; // clear any previous text and formatting
out.append("\n" + msg.timestamp()
+ "\n\n***** FATAL SIGNAL RECEIVED ******* \n"
+ '"' + msg.message() + '"');
return out;
}
示例3: DefaultLogDetailsToString
// helper for setting the normal log details in an entry
std::string LogMessage::DefaultLogDetailsToString(const LogMessage& msg) {
std::string out;
out.append(msg.timestamp() + "\t"
+ msg.level()
+ " ["
+ msg.file()
+ "->"
+ msg.function()
+ ":" + msg.line() + "]\t");
return out;
}
示例4: LogDetailsToString
// helper for setting the normal log details in an entry
std::string LogDetailsToString(const LogMessage& msg) {
std::string out;
out.append("\n" + msg.timestamp() + " " + msg.microseconds() + "\t"
+ msg.level() + " [" + msg.file() + ":" + msg.line() + "]\t");
return out;
}