Skip to content

Commit 53d74d2

Browse files
committed
Logging: reclassify remaining log messages
1 parent a17cf8f commit 53d74d2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

include/mp/proxy-io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ std::unique_ptr<ProxyClient<InitInterface>> ConnectStream(EventLoop& loop, int f
671671
init_client = connection->m_rpc_system->bootstrap(ServerVatId().vat_id).castAs<InitInterface>();
672672
Connection* connection_ptr = connection.get();
673673
connection->onDisconnect([&loop, connection_ptr] {
674-
MP_LOG(loop, Log::Info) << "IPC client: unexpected network disconnect.";
674+
MP_LOG(loop, Log::Warning) << "IPC client: unexpected network disconnect.";
675675
delete connection_ptr;
676676
});
677677
});

include/mp/proxy-types.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -629,15 +629,15 @@ void clientInvoke(ProxyClient& proxy_client, const GetRequest& get_request, Fiel
629629
using FieldList = typename ProxyClientMethodTraits<typename Request::Params>::Fields;
630630
invoke_context.emplace(*proxy_client.m_context.connection, thread_context);
631631
IterateFields().handleChain(*invoke_context, request, FieldList(), typename FieldObjs::BuildParams{&fields}...);
632-
MP_LOGPLAIN(*proxy_client.m_context.loop, Log::Info)
632+
MP_LOGPLAIN(*proxy_client.m_context.loop, Log::Debug)
633633
<< "{" << thread_context.thread_name << "} IPC client send "
634634
<< TypeName<typename Request::Params>();
635635
MP_LOGPLAIN(*proxy_client.m_context.loop, Log::Trace)
636636
<< "send data: " << LogEscape(request.toString(), proxy_client.m_context.loop->m_log_opts.max_chars);
637637

638638
proxy_client.m_context.loop->m_task_set->add(request.send().then(
639639
[&](::capnp::Response<typename Request::Results>&& response) {
640-
MP_LOGPLAIN(*proxy_client.m_context.loop, Log::Info)
640+
MP_LOGPLAIN(*proxy_client.m_context.loop, Log::Debug)
641641
<< "{" << thread_context.thread_name << "} IPC client recv "
642642
<< TypeName<typename Request::Results>();
643643
MP_LOGPLAIN(*proxy_client.m_context.loop, Log::Trace)
@@ -704,7 +704,7 @@ kj::Promise<void> serverInvoke(Server& server, CallContext& call_context, Fn fn)
704704
using Results = typename decltype(call_context.getResults())::Builds;
705705

706706
int req = ++server_reqs;
707-
MP_LOG(*server.m_context.loop, Log::Info) << "IPC server recv request #" << req << " "
707+
MP_LOG(*server.m_context.loop, Log::Debug) << "IPC server recv request #" << req << " "
708708
<< TypeName<typename Params::Reads>();
709709
MP_LOG(*server.m_context.loop, Log::Trace) << "request data: "
710710
<< LogEscape(params.toString(), server.m_context.loop->m_log_opts.max_chars);
@@ -723,15 +723,15 @@ kj::Promise<void> serverInvoke(Server& server, CallContext& call_context, Fn fn)
723723
return ReplaceVoid([&]() { return fn.invoke(server_context, ArgList()); },
724724
[&]() { return kj::Promise<CallContext>(kj::mv(call_context)); })
725725
.then([&server, req](CallContext call_context) {
726-
MP_LOG(*server.m_context.loop, Log::Info) << "IPC server send response #" << req << " " << TypeName<Results>();
726+
MP_LOG(*server.m_context.loop, Log::Debug) << "IPC server send response #" << req << " " << TypeName<Results>();
727727
MP_LOG(*server.m_context.loop, Log::Trace) << "response data: "
728728
<< LogEscape(call_context.getResults().toString(), server.m_context.loop->m_log_opts.max_chars);
729729
});
730730
} catch (const std::exception& e) {
731-
MP_LOG(*server.m_context.loop, Log::Info) << "IPC server unhandled exception: " << e.what();
731+
MP_LOG(*server.m_context.loop, Log::Error) << "IPC server unhandled exception: " << e.what();
732732
throw;
733733
} catch (...) {
734-
MP_LOG(*server.m_context.loop, Log::Info) << "IPC server unhandled exception";
734+
MP_LOG(*server.m_context.loop, Log::Error) << "IPC server unhandled exception";
735735
throw;
736736
}
737737
}

include/mp/type-context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ auto PassField(Priority<1>, TypeList<>, ServerContext& server_context, const Fn&
150150
// thread.
151151
KJ_IF_MAYBE (thread_server, perhaps) {
152152
const auto& thread = static_cast<ProxyServer<Thread>&>(*thread_server);
153-
MP_LOG(*server.m_context.loop, Log::Info)
153+
MP_LOG(*server.m_context.loop, Log::Debug)
154154
<< "IPC server post request #" << req << " {" << thread.m_thread_context.thread_name << "}";
155155
thread.m_thread_context.waiter->post(std::move(invoke));
156156
} else {
157-
MP_LOG(*server.m_context.loop, Log::Info)
157+
MP_LOG(*server.m_context.loop, Log::Error)
158158
<< "IPC server error request #" << req << ", missing thread to execute request";
159159
throw std::runtime_error("invalid thread handle");
160160
}

src/mp/proxy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ thread_local ThreadContext g_thread_context;
4242
void LoggingErrorHandler::taskFailed(kj::Exception&& exception)
4343
{
4444
KJ_LOG(ERROR, "Uncaught exception in daemonized task.", exception);
45-
MP_LOG(m_loop, Log::Info) << "Uncaught exception in daemonized task.";
45+
MP_LOG(m_loop, Log::Error) << "Uncaught exception in daemonized task.";
4646
}
4747

4848
EventLoopRef::EventLoopRef(EventLoop& loop, Lock* lock) : m_loop(&loop), m_lock(lock)

0 commit comments

Comments
 (0)