2014-01-25 04:09:04 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../level.h"
|
|
|
|
#include "fast_oss.h"
|
|
|
|
|
|
|
|
namespace c11log {
|
|
|
|
class logger;
|
|
|
|
namespace details {
|
|
|
|
|
|
|
|
class line_logger {
|
|
|
|
public:
|
2014-01-27 04:44:10 -05:00
|
|
|
line_logger(logger* callback_logger, level::level_enum msg_level);
|
|
|
|
line_logger(logger* callback_logger):_callback_logger(nullptr) {};
|
|
|
|
line_logger(const line_logger&){};
|
2014-01-25 04:09:04 -05:00
|
|
|
~line_logger();
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
line_logger& operator<<(const T& msg)
|
|
|
|
{
|
|
|
|
if (_callback_logger)
|
|
|
|
_oss << msg;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
logger* _callback_logger;
|
|
|
|
details::fast_oss _oss;
|
|
|
|
|
|
|
|
};
|
|
|
|
} //Namespace details
|
2014-01-27 04:44:10 -05:00
|
|
|
} // Namespace c11log
|