CASSANDRASC-34: Allow for LoggerHandler to be injected
authorFrancisco Guerrero <francisco.guerrero@apple.com>
Fri, 11 Mar 2022 23:43:24 +0000 (15:43 -0800)
committerYifan Cai <yifan_cai@apple.com>
Mon, 11 Apr 2022 20:12:46 +0000 (13:12 -0700)
commit7a5e710a2173e492907edc4094e052157a562103
tree15b8dd201b2846a5243940c93e2233f99238cd62
parentbc219cbf75bdbfdc7a95b3160ef17332c9274b44
CASSANDRASC-34: Allow for LoggerHandler to be injected

Currently, `vertxRouter` adds an instance of `LoggerHandler` to the top level route.
This is prescriptive and it doesn't allow for a different implementation of the LoggerHandler
to be injected.

In this commit, `LoggerHandler` is created in the `MainModule` as a singleton and then
injected in the `vertxRouter` method. This allows for a new implementation of the `LoggerHandler`
to be provided.
CHANGES.txt
gradle.properties
src/main/java/org/apache/cassandra/sidecar/MainModule.java
src/test/java/org/apache/cassandra/sidecar/LoggerHandlerInjectionTest.java [new file with mode: 0644]