diff options
Diffstat (limited to 'src/common/logging/backend.cpp')
| -rw-r--r-- | src/common/logging/backend.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 04bc3128f..62cfde397 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -113,19 +113,19 @@ private: | |||
| 113 | Entry CreateEntry(Class log_class, Level log_level, const char* filename, unsigned int line_nr, | 113 | Entry CreateEntry(Class log_class, Level log_level, const char* filename, unsigned int line_nr, |
| 114 | const char* function, std::string message) const { | 114 | const char* function, std::string message) const { |
| 115 | using std::chrono::duration_cast; | 115 | using std::chrono::duration_cast; |
| 116 | using std::chrono::microseconds; | ||
| 116 | using std::chrono::steady_clock; | 117 | using std::chrono::steady_clock; |
| 117 | 118 | ||
| 118 | Entry entry; | 119 | return { |
| 119 | entry.timestamp = | 120 | .timestamp = duration_cast<microseconds>(steady_clock::now() - time_origin), |
| 120 | duration_cast<std::chrono::microseconds>(steady_clock::now() - time_origin); | 121 | .log_class = log_class, |
| 121 | entry.log_class = log_class; | 122 | .log_level = log_level, |
| 122 | entry.log_level = log_level; | 123 | .filename = filename, |
| 123 | entry.filename = filename; | 124 | .line_num = line_nr, |
| 124 | entry.line_num = line_nr; | 125 | .function = function, |
| 125 | entry.function = function; | 126 | .message = std::move(message), |
| 126 | entry.message = std::move(message); | 127 | .final_entry = false, |
| 127 | 128 | }; | |
| 128 | return entry; | ||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | std::mutex writing_mutex; | 131 | std::mutex writing_mutex; |