faas-js-runtime icon indicating copy to clipboard operation
faas-js-runtime copied to clipboard

Hide the health check log lines

Open mohsen0 opened this issue 2 years ago • 2 comments

Hi

is there a way to hide health check log lines? it is quite expensive for a logging system.

{"level":30,"time":1695291091052,"pid":6095,"hostname":"localhost","node_version":"v14.21.3","reqId":"req-8","req":{"method":"GET","url":"/health/liveness","hostname":"localhost:8080","remoteAddress":"::ffff:127.0.0.1","remotePort":62095},"msg":"incoming request"}
{"level":30,"time":1695291091054,"pid":6095,"hostname":"localhost","node_version":"v14.21.3","reqId":"req-8","res":{"statusCode":200},"responseTime":1.2222920656204224,"msg":"request completed"}

Thanks

mohsen0 avatar Sep 21 '23 10:09 mohsen0

I don't think you can specifically suppress health probes. You could try changing LOG_LEVEL envvar to prevent these.

matejvasek avatar Sep 21 '23 12:09 matejvasek

You could try changing LOG_LEVEL envvar to prevent these.

This would also affect the regular logging, which might be ok too? I wonder if it would be beneficial to have an option to not show health check logging?

lholmquist avatar Sep 21 '23 18:09 lholmquist