Improve logging

This commit is contained in:
Daniel 2022-10-13 14:17:42 +02:00
parent 75f4d43347
commit 106793b56a

View file

@ -112,7 +112,7 @@ func interceptionPrep() error {
func resetAllConnectionVerdicts() { func resetAllConnectionVerdicts() {
// Resetting will force all the connection to be evaluated by the firewall again // Resetting will force all the connection to be evaluated by the firewall again
// this will set new verdicts if configuration was update or spn has been disabled or enabled. // this will set new verdicts if configuration was update or spn has been disabled or enabled.
log.Info("interception: marking all connections for re-evaluation") log.Info("interception: re-evaluating all connections")
// Create tracing context. // Create tracing context.
ctx, tracer := log.AddTracer(context.Background()) ctx, tracer := log.AddTracer(context.Background())
@ -157,7 +157,7 @@ func resetAllConnectionVerdicts() {
} }
}() }()
} }
tracer.Infof("profile: changed verdict on %d connections", changedVerdicts) tracer.Infof("filter: changed verdict on %d connections", changedVerdicts)
tracer.Submit() tracer.Submit()
err := interception.ResetVerdictOfAllConnections() err := interception.ResetVerdictOfAllConnections()
@ -495,7 +495,6 @@ func FilterConnection(ctx context.Context, conn *network.Connection, pkt packet.
if filterEnabled() { if filterEnabled() {
log.Tracer(ctx).Trace("filter: starting decision process") log.Tracer(ctx).Trace("filter: starting decision process")
decideOnConnection(ctx, conn, pkt) decideOnConnection(ctx, conn, pkt)
// FIXME: nameserver calls this directly without finalizeVerdict.
} else { } else {
conn.Accept("privacy filter disabled", noReasonOptionKey) conn.Accept("privacy filter disabled", noReasonOptionKey)
} }