_JM_NAMESPACE::Logger< Formatter > Class Template Reference
#include <logger.h>
List of all members.
Public Member Functions |
| | Logger (std::ostream &out, const std::string &header) |
| | Logger (const std::string &header) |
| | ~Logger () |
| void | output (std::ostream &out) |
| void | start_log (const std::string &prefix, const std::string &file, const std::string &function, int line) |
| template<typename T > |
| Logger & | operator<< (const T &msg) |
| void | end_log () |
Private Attributes |
| Formatter | _ft |
| std::ostream & | _out |
| const std::string | _header |
Detailed Description
template<typename Formatter = SimpleFormatter>
class _JM_NAMESPACE::Logger< Formatter >
Logger class providing explicit formatting, runtime output level and output destination change. typedef _JM_NAMESPACE::Logger<> KernelLogger; KernelLogger kernelog ("KERNEL"); define LOG(logger,msg) \ logger.start_log ("level", __FILE__, __FUNCTION__, __LINE__); \ logger << msg; \ logger.end_log();
Advanced usage:
Constructor & Destructor Documentation
template<typename Formatter = SimpleFormatter>
template<typename Formatter = SimpleFormatter>
template<typename Formatter = SimpleFormatter>
Member Function Documentation
template<typename Formatter = SimpleFormatter>
template<typename Formatter = SimpleFormatter>
template<typename T >
template<typename Formatter = SimpleFormatter>
template<typename Formatter = SimpleFormatter>
| void _JM_NAMESPACE::Logger< Formatter >::start_log |
( |
const std::string & |
prefix, |
|
|
const std::string & |
file, |
|
|
const std::string & |
function, |
|
|
int |
line | |
|
) |
| | [inline] |
Member Data Documentation
template<typename Formatter = SimpleFormatter>
template<typename Formatter = SimpleFormatter>
template<typename Formatter = SimpleFormatter>
The documentation for this class was generated from the following file: