From 0036d2567286901e4d254c7c7923331df4b1e3f0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 18 May 2020 15:33:05 +0200 Subject: [PATCH] Demote error and warning logging when process of packet could not be found --- network/connection.go | 4 ++-- process/find.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/network/connection.go b/network/connection.go index 1b99842b..0a6fb592 100644 --- a/network/connection.go +++ b/network/connection.go @@ -76,7 +76,7 @@ func NewConnectionFromDNSRequest(ctx context.Context, fqdn string, cnames []stri false, // inbound, irrevelant ) if err != nil { - log.Warningf("network: failed to find process of dns request for %s: %s", fqdn, err) + log.Debugf("network: failed to find process of dns request for %s: %s", fqdn, err) proc = process.GetUnidentifiedProcess(ctx) } @@ -99,7 +99,7 @@ func NewConnectionFromFirstPacket(pkt packet.Packet) *Connection { // get Process proc, inbound, err := process.GetProcessByPacket(pkt) if err != nil { - log.Warningf("network: failed to find process of packet %s: %s", pkt, err) + log.Debugf("network: failed to find process of packet %s: %s", pkt, err) proc = process.GetUnidentifiedProcess(pkt.Ctx()) } diff --git a/process/find.go b/process/find.go index aa0a4071..936d9214 100644 --- a/process/find.go +++ b/process/find.go @@ -56,13 +56,13 @@ func GetProcessByEndpoints( var pid int pid, connInbound, err = state.Lookup(ipVersion, protocol, localIP, localPort, remoteIP, remotePort, pktInbound) if err != nil { - log.Tracer(ctx).Errorf("process: failed to find PID of connection: %s", err) + log.Tracer(ctx).Debugf("process: failed to find PID of connection: %s", err) return nil, connInbound, err } process, err = GetOrFindPrimaryProcess(ctx, pid) if err != nil { - log.Tracer(ctx).Errorf("process: failed to find (primary) process with PID: %s", err) + log.Tracer(ctx).Debugf("process: failed to find (primary) process with PID: %s", err) return nil, connInbound, err }