Skip to content

Commit cd9f8bd

Browse files
committed
Merge #258: log: add socket connected info message and demote destroy logs to debug
98f1352 log: add socket connected info message and demote destroy logs to debug (ViniciusCestarii) Pull request description: Closes #227 Add "IPC server: socket connected." info log to match the existing "IPC server: socket connected." message, and demote clientDestroy/serverDestroy log messages from Info to Debug to reduce noise. ACKs for top commit: ryanofsky: Code review ACK 98f1352. Thanks for this the fix, these changes make sense. Tree-SHA512: 448689c69e58a5d91bd41106949f7078a7a4279e667f25ef56cafee0776adc5ac56d22fb53664405c26bc7378ab5f4b21bbb8c61d1c1e2e7bdbf7ec73b400aaf
2 parents b5d6258 + 98f1352 commit cd9f8bd

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

include/mp/proxy-io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ void _Serve(EventLoop& loop, kj::Own<kj::AsyncIoStream>&& stream, InitImpl& init
814814
return kj::heap<ProxyServer<InitInterface>>(std::shared_ptr<InitImpl>(&init, [](InitImpl*){}), connection);
815815
});
816816
auto it = loop.m_incoming_connections.begin();
817+
MP_LOG(loop, Log::Info) << "IPC server: socket connected.";
817818
it->onDisconnect([&loop, it] {
818819
MP_LOG(loop, Log::Info) << "IPC server: socket disconnected.";
819820
loop.m_incoming_connections.erase(it);

include/mp/proxy-types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ template <typename Client>
645645
void clientDestroy(Client& client)
646646
{
647647
if (client.m_context.connection) {
648-
MP_LOG(*client.m_context.loop, Log::Info) << "IPC client destroy " << typeid(client).name();
648+
MP_LOG(*client.m_context.loop, Log::Debug) << "IPC client destroy " << typeid(client).name();
649649
} else {
650650
KJ_LOG(INFO, "IPC interrupted client destroy", typeid(client).name());
651651
}
@@ -654,7 +654,7 @@ void clientDestroy(Client& client)
654654
template <typename Server>
655655
void serverDestroy(Server& server)
656656
{
657-
MP_LOG(*server.m_context.loop, Log::Info) << "IPC server destroy " << typeid(server).name();
657+
MP_LOG(*server.m_context.loop, Log::Debug) << "IPC server destroy " << typeid(server).name();
658658
}
659659

660660
//! Entry point called by generated client code that looks like:

0 commit comments

Comments
 (0)