mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-28 02:13:45 +08:00
swaglog.cc/cloudlog_common: pass json object by reference (#24996)
* pass json object by reference * space between functions old-commit-hash: 1ac1fe632f8945a24c12413cfad7aa93fac17f9b
This commit is contained in:
+2
-1
@@ -66,8 +66,9 @@ static void log(int levelnum, const char* filename, int lineno, const char* func
|
||||
char levelnum_c = levelnum;
|
||||
zmq_send(s.sock, (levelnum_c + log_s).c_str(), log_s.length() + 1, ZMQ_NOBLOCK);
|
||||
}
|
||||
|
||||
static void cloudlog_common(int levelnum, const char* filename, int lineno, const char* func,
|
||||
char* msg_buf, json11::Json::object msg_j={}) {
|
||||
char* msg_buf, const json11::Json::object &msg_j={}) {
|
||||
std::lock_guard lk(s.lock);
|
||||
if (!s.initialized) s.initialize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user