Timeline for Java: Only log first error occurrence (with hourly reset)
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 27, 2019 at 7:29 | comment | added | Roland Illig |
In that case, maybe you need 2 variables: errorOccurred and errorLogged .
|
|
Dec 27, 2019 at 1:01 | comment | added | TeaCup | The errorOccured must be outside the if statement, because the method handleCacheGetError is being executed only if the server is down, hence it will update only if the server is down:) | |
Dec 27, 2019 at 0:58 | comment | added | TeaCup | Thanks for input! The idea of using such a ThrottledLogged is interesting and surely has its place, in my case however I think it would not work, because the message limit would be already be consumed after the first second of my server being down. | |
Dec 27, 2019 at 0:01 | history | answered | Roland Illig | CC BY-SA 4.0 |