Allow to set firewall log level

This commit is contained in:
Viktor Liu
2025-01-03 16:02:33 +01:00
parent 3ce39905c6
commit f26b418e83
7 changed files with 34 additions and 0 deletions

View File

@@ -488,7 +488,15 @@ func (s *Server) SetLogLevel(_ context.Context, req *proto.SetLogLevelRequest) (
}
log.SetLevel(level)
if s.connectClient != nil &&
s.connectClient.Engine() != nil &&
s.connectClient.Engine().GetFirewallManager() != nil {
s.connectClient.Engine().GetFirewallManager().SetLogLevel(level)
}
log.Infof("Log level set to %s", level.String())
return &proto.SetLogLevelResponse{}, nil
}