mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
fixes
This commit is contained in:
@@ -13,8 +13,8 @@ namespace formatters {
|
||||
typedef std::chrono::system_clock clock;
|
||||
typedef clock::time_point time_point;
|
||||
typedef std::function<std::string(const std::string& logger_name, const std::string&, level::level_enum, const time_point&)> format_fn;
|
||||
void format_time(const time_point& tp, std::ostream &dest);
|
||||
void format_time(std::ostream &dest);
|
||||
|
||||
|
||||
std::string to_hex(const unsigned char* buf, std::size_t size);
|
||||
|
||||
class formatter {
|
||||
@@ -30,9 +30,11 @@ public:
|
||||
// Format: [2013-12-29 01:04:42.900] [logger_name:Info] Message body
|
||||
void format_header(const std::string& logger_name, level::level_enum level, const time_point& tp, std::ostream& dest) override
|
||||
{
|
||||
format_time(tp, dest);
|
||||
_format_time(tp, dest);
|
||||
dest << " [" << logger_name << ":" << c11log::level::to_str(level) << "] ";
|
||||
}
|
||||
private:
|
||||
void _format_time(const time_point& tp, std::ostream &dest);
|
||||
|
||||
};
|
||||
} //namespace formatter
|
||||
|
Reference in New Issue
Block a user