aboutsummaryrefslogtreecommitdiff
path: root/zenserver/upstream/zen.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-16 13:14:02 +0200
committerStefan Boberg <[email protected]>2021-09-16 13:14:02 +0200
commit99c560212f0752b20a07fe6e968e93b9a70e7d4e (patch)
tree96c2df68df0e5d25c89517f1013306a7dc4deaf9 /zenserver/upstream/zen.cpp
parentFixed some unreferenced variable warnings (why don't we get these in sln buil... (diff)
downloadzen-99c560212f0752b20a07fe6e968e93b9a70e7d4e.tar.xz
zen-99c560212f0752b20a07fe6e968e93b9a70e7d4e.zip
Fixed up mesh logging
Diffstat (limited to 'zenserver/upstream/zen.cpp')
-rw-r--r--zenserver/upstream/zen.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/zenserver/upstream/zen.cpp b/zenserver/upstream/zen.cpp
index eef92bab4..b553558e7 100644
--- a/zenserver/upstream/zen.cpp
+++ b/zenserver/upstream/zen.cpp
@@ -5,6 +5,7 @@
#include <zencore/compactbinarybuilder.h>
#include <zencore/compactbinaryvalidation.h>
#include <zencore/fmtutils.h>
+#include <zencore/session.h>
#include <zencore/stream.h>
#include "cache/structuredcachestore.h"
@@ -72,7 +73,7 @@ namespace detail {
// Note that currently this just implements an UDP echo service for testing purposes
-Mesh::Mesh(asio::io_context& IoContext) : m_IoContext(IoContext)
+Mesh::Mesh(asio::io_context& IoContext) : m_Log(logging::Get("mesh")), m_IoContext(IoContext), m_SessionId(zen::GetSessionId())
{
}
@@ -257,10 +258,10 @@ Mesh::IssueReceive()
if (SessionId != Oid::Zero && SessionId != m_SessionId)
{
- const uint16_t Port = (++It)->AsUInt16(m_SenderEndpoint.port());
- const uint32_t Lsn = (++It)->AsUInt32();
+ // const uint16_t Port = (++It)->AsUInt16(m_SenderEndpoint.port());
+ // const uint32_t Lsn = (++It)->AsUInt32();
- ZEN_INFO("received hey from {} ({})", SenderIp, SessionId);
+ ZEN_TRACE("received hey from {} ({})", SenderIp, SessionId);
RwLock::ExclusiveLockScope _(m_SessionsLock);
@@ -279,7 +280,7 @@ Mesh::IssueReceive()
{
Oid SessionId = Field.AsObjectId();
- ZEN_INFO("received bye from {} ({})", SenderIp, SessionId);
+ ZEN_DEBUG("received bye from {} ({})", SenderIp, SessionId);
// We could verify that it's sent from a known IP before erasing the
// session, if we want to be paranoid