|
Core Library
1.7.0.0
Library containing core utilities and tools for threading, networking, logging, INI and CSV file management etc.
|
Default log line formater. More...
#include <DebugLog.h>
Public Member Functions | |
| void | operator() (std::ostream &os, std::time_t timeStamp, const std::string &message, const std::string &logMsgLevel, const std::string &file, const std::string &function, int lineNo, const std::thread::id &threadID) const |
| Function operator to perform the line formatting. More... | |
Default log line formater.
This functor formats the log message elements into a single line in the log following default formatting.
"Date/Time" | "Level" | "Message" | "File" | "Function" | Line = "..." | Thread ID = "..."
If different formatting is required then a user can define their own compatible formatter functor, as long as it has a fully compatible interface with DefaultLogFormat.
| void core_lib::log::DefaultLogFormat::operator() | ( | std::ostream & | os, |
| std::time_t | timeStamp, | ||
| const std::string & | message, | ||
| const std::string & | logMsgLevel, | ||
| const std::string & | file, | ||
| const std::string & | function, | ||
| int | lineNo, | ||
| const std::thread::id & | threadID | ||
| ) | const |
Function operator to perform the line formatting.
| [out] | os | - Output stream to write formatted line to. |
| [in] | timeStamp | -The timestamp. |
| [in] | message | - The actual message. |
| [in] | logMsgLevel | - Log message level. |
| [in] | file | - File where log message was generated. |
| [in] | function | - Function where log message was generated. |
| [in] | lineNo | - Line number where log message was generated. |
| [in] | threadID | - Thread ID fo where log message was generated. |