aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server/common/log.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-13 08:39:02 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-13 08:42:08 +0300
commit6913c6d965d64481ed09fc06a43154f35e8bd914 (patch)
treefa8d3f360a651a31fba4b91a09a5bba505a904c4 /server/common/log.hpp
parentTravis: only run clang-format on master (diff)
downloadmath-server-6913c6d965d64481ed09fc06a43154f35e8bd914.tar.gz
math-server-6913c6d965d64481ed09fc06a43154f35e8bd914.zip
clang-format all the code
Diffstat (limited to '')
-rw-r--r--server/common/log.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/common/log.hpp b/server/common/log.hpp
index 5b61c58..cfb01a5 100644
--- a/server/common/log.hpp
+++ b/server/common/log.hpp
@@ -10,7 +10,6 @@
#include <boost/system/error_code.hpp>
#include <ctime>
-
#include <iomanip>
#include <iostream>
#include <sstream>
@@ -23,7 +22,9 @@ namespace math::server::log {
namespace details {
-inline std::thread::id get_tid() { return std::this_thread::get_id(); }
+inline std::thread::id get_tid() {
+ return std::this_thread::get_id();
+}
inline std::string get_timestamp() {
const auto now = boost::posix_time::second_clock::universal_time();
@@ -37,7 +38,7 @@ inline void log(const std::string& msg) {
std::clog << get_timestamp() << " | " << get_tid() << " | " << msg << '\n';
}
-}
+} // namespace details
template <typename... Args>
inline void log(const std::string_view& fmt, Args&&... args) {
@@ -53,4 +54,4 @@ inline void error(const boost::system::error_code& ec) {
details::log(ec.message());
}
-}
+} // namespace math::server::log