jonog / redalert

:rocket: continuously test all the things - trigger alerts on failure :boom:
MIT License
91 stars 16 forks source link

Config - Reduce log verbosity #65

Closed jacksgt closed 6 years ago

jacksgt commented 6 years ago

Hi,

the web-ping check is currently quite noisy:

myservice 2018/01/30 09:50:40 GET https://example.com/v1/status/ApiListener
myservice 2018/01/30 09:50:40 Latency  1.73994

every ten seconds.

Redalert should be able to suppress these "info" logs and only output warnings / errors.

jacksgt commented 6 years ago

These two lines cause the issue:

https://github.com/jonog/redalert/blob/94cb2dd9acce7582e03441cce839a15ff70605bd/checks/web_ping.go#L82

https://github.com/jonog/redalert/blob/94cb2dd9acce7582e03441cce839a15ff70605bd/checks/web_ping.go#L106

I think it should be possible in Go to assign a different logger (such as /dev/null) to WebPinger.log. That way, critical errors will still be seen as they are returned via errors.new()

jacksgt commented 6 years ago

Hey there, any update on https://github.com/jonog/redalert/tree/feature/verbose-logging ?