Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flag to disable logs? #1076

Open
hsnhrn opened this issue Feb 1, 2022 · 3 comments
Open

flag to disable logs? #1076

hsnhrn opened this issue Feb 1, 2022 · 3 comments

Comments

@hsnhrn
Copy link

hsnhrn commented Feb 1, 2022

I am runnning the grpcwebproxy something like this:

grpcwebproxy
--backend_addr=localhost:9090
--backend_tls_noverify
I need to disable the log. which flag can i add to disable it?

@johanbrandhorst
Copy link
Contributor

Hi! Here are the supported options:

flagBindAddr = pflag.String("server_bind_address", "0.0.0.0", "address to bind the server to")
flagHttpPort = pflag.Int("server_http_debug_port", 8080, "TCP port to listen on for HTTP1.1 debug calls.")
flagHttpTlsPort = pflag.Int("server_http_tls_port", 8443, "TCP port to listen on for HTTPS (gRPC, gRPC-Web).")
flagAllowAllOrigins = pflag.Bool("allow_all_origins", false, "allow requests from any origin.")
flagAllowedOrigins = pflag.StringSlice("allowed_origins", nil, "comma-separated list of origin URLs which are allowed to make cross-origin requests.")
flagAllowedHeaders = pflag.StringSlice("allowed_headers", []string{}, "comma-separated list of headers which are allowed to propagate to the gRPC backend.")
runHttpServer = pflag.Bool("run_http_server", true, "whether to run HTTP server")
runTlsServer = pflag.Bool("run_tls_server", true, "whether to run TLS server")
useWebsockets = pflag.Bool("use_websockets", false, "whether to use beta websocket transport layer")
websocketPingInterval = pflag.Duration("websocket_ping_interval", 0, "whether to use websocket keepalive pinging. Only used when using websockets. Configured interval must be >= 1s.")
websocketReadLimit = pflag.Int64("websocket_read_limit", 0, "sets the maximum message read limit on the underlying websocket. The default message read limit is 32769 bytes.")
flagHttpMaxWriteTimeout = pflag.Duration("server_http_max_write_timeout", 10*time.Second, "HTTP server config, max write duration.")
flagHttpMaxReadTimeout = pflag.Duration("server_http_max_read_timeout", 10*time.Second, "HTTP server config, max read duration.")
enableRequestDebug = pflag.Bool("enable_request_debug", false, "whether to enable (/debug/requests) and connection(/debug/events) monitoring; also controls prometheus monitoring (/metrics)")
enableHealthCheckService = pflag.Bool("enable_health_check_service", false, "whether to enable health checking service on the backend connection")
enableHealthEndpoint = pflag.Bool("enable_health_endpoint", false, "whether to enable health endpoint on the proxy. If enable_health_check_service is set to true the endpoint will serve the status got from backend, otherwise http.StatusOK(200) will be returned")
healthEndpointName = pflag.String("health_endpoint_name", "_health", "health endpoint name to be used (_health by default)")
healthServiceName = pflag.String("health_service_name", "", "health service name to request from backend (\"\" by default, asking for status of all services at once on the backend)")
. There does not appear to be an option to disable logging. Would you be willing to contribute one?

@hsnhrn
Copy link
Author

hsnhrn commented Feb 8, 2022

I would love to contribute. A bit new to Golang thats why i will need a bit of help. Would you be able to help me in providing a little bit of documentation about it? Thanks a lot!

@johanbrandhorst
Copy link
Contributor

Lets explore actually if we can help each other in a different way. Have you tried just redirecting standard out to /dev/null when running the proxy?

grpcwebproxy --backend_addr=localhost:9090 --backend_tls_noverify > /dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants