Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore known exceptions from logging (#1032)
Motivation: Central Dogma does not use Armeria's `LoggingClient`, so known exceptions handled by `HttpApiExceptionHandler` are logged in `DefaultUnloggedExceptionsReporter`. ```java Observed 1 exception(s) that didn't reach a LoggingService in the last 10000ms(10000000000ns). Please consider adding a LoggingService as the outermost decorator to get detailed error logs. One of the thrown exceptions: com.linecorp.centraldogma.common.RedundantChangeException: changes did not change anything in <project>/<repository> at revision <rev>: [] at com.linecorp.centraldogma.server.internal.storage.repository.git.GitRepository.commit0(GitRepository.java:964) at com.linecorp.centraldogma.server.internal.storage.repository.git.GitRepository.blockingCommit(GitRepository.java:904) at com.linecorp.centraldogma.server.internal.storage.repository.git.GitRepository.lambda$commit$6(GitRepository.java:875) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) at io.micrometer.core.instrument.internal.TimedRunnable.run(TimedRunnable.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:833) ``` Moditications: - Set `ctx.setShouldReportUnloggedExceptions(false)` to ignore known exceptions they don't need to be logged. Result: You no longer see warnings about ignorable exceptions.
- Loading branch information