Skip to content

Commit 1ac1fe6

Browse files
authored
swaglog.cc/cloudlog_common: pass json object by reference (#24996)
* pass json object by reference * space between functions
1 parent b3f4e94 commit 1ac1fe6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/swaglog.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ static void log(int levelnum, const char* filename, int lineno, const char* func
6666
char levelnum_c = levelnum;
6767
zmq_send(s.sock, (levelnum_c + log_s).c_str(), log_s.length() + 1, ZMQ_NOBLOCK);
6868
}
69+
6970
static void cloudlog_common(int levelnum, const char* filename, int lineno, const char* func,
70-
char* msg_buf, json11::Json::object msg_j={}) {
71+
char* msg_buf, const json11::Json::object &msg_j={}) {
7172
std::lock_guard lk(s.lock);
7273
if (!s.initialized) s.initialize();
7374

0 commit comments

Comments
 (0)