|
|
@@ -23,15 +23,16 @@
|
|
|
#include <memory>
|
|
|
#include <string>
|
|
|
|
|
|
-#include "logger_fwd.h"
|
|
|
#include "message.h"
|
|
|
|
|
|
#define log_message( logger, lvl, ... ) \
|
|
|
logger.log(level::lvl, log_here, __VA_ARGS__)
|
|
|
|
|
|
namespace logging {
|
|
|
+ enum class level : int;
|
|
|
+ struct location_info;
|
|
|
class logger_impl;
|
|
|
- class manager;
|
|
|
+ struct logpacket;
|
|
|
|
|
|
class logger {
|
|
|
public:
|
|
|
@@ -39,11 +40,11 @@ namespace logging {
|
|
|
|
|
|
template <typename... Args>
|
|
|
inline void log(level ll, std::string const & interp, Args && ...args) {
|
|
|
- log(ll, location_info{}, interp, std::forward<Args>(args)...);
|
|
|
+ log(ll, message(interp, std::forward<Args>(args)...));
|
|
|
}
|
|
|
|
|
|
template <typename... Args>
|
|
|
- inline void log(level ll, location_info info,
|
|
|
+ inline void log(level ll, location_info const & info,
|
|
|
std::string const & interp, Args && ...args) {
|
|
|
log(ll, info, message(interp, std::forward<Args>(args)...));
|
|
|
}
|
|
|
@@ -55,7 +56,8 @@ namespace logging {
|
|
|
|
|
|
private:
|
|
|
friend class manager;
|
|
|
- void log(level ll, location_info info, message const&);
|
|
|
+ void log(level ll, message const&);
|
|
|
+ void log(level ll, location_info const & info, message const&);
|
|
|
|
|
|
private:
|
|
|
std::string const logger_name_;
|