aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-03-24 17:46:14 +0000
committerGravatar Sadie Powell2023-03-24 17:46:14 +0000
commit719bec8636f2a5b3c19c6c7aabb58f391b28bdfe (patch)
treea561d1aa2507d06dfcf294701d2902c66dd1df32 /src
parentThe services module does not require an account API instance. (diff)
Marginally improve the performance of JSON logging.
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_log_json.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/extra/m_log_json.cpp b/src/modules/extra/m_log_json.cpp
index 4b401be92..820f7f161 100644
--- a/src/modules/extra/m_log_json.cpp
+++ b/src/modules/extra/m_log_json.cpp
@@ -81,17 +81,17 @@ public:
rapidjson::Writer writer(*this);
writer.StartObject();
{
- writer.Key("time");
+ writer.Key("time", 4);
writer.String(timestr.c_str(), static_cast<rapidjson::SizeType>(timestr.size()));
- writer.Key("type");
+ writer.Key("type", 4);
writer.String(type.c_str(), static_cast<rapidjson::SizeType>(type.size()));
- writer.Key("level");
+ writer.Key("level", 5);
const std::string levelstr = Log::LevelToString(level);
writer.String(levelstr.c_str(), static_cast<rapidjson::SizeType>(levelstr.size()));
- writer.Key("message");
+ writer.Key("message", 7);
writer.Key(message.c_str(), static_cast<rapidjson::SizeType>(message.size()));
}
writer.EndObject();