You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
thank you for this project, providing out-of-the-box Kafka Logging.
I'm having problem configuring the library.
Goal:
This library provides a default JSON formatter. Instead, I'd like to customize it. From my understanding, this is possibile extending the 'FormatterOrLayout', so that its implementation will be injected into "KafkaLogHandlerRecorder".
Problem:
This isn't happening and the application is always logging with default formatter. On startup, this library logs "No formatter or layout for kafka logger provided.", as confirmation that nothing was injected.
Scenario:
In the POM, both dependencies were added:
quarkus-logging-kafka
quarkus-logging-kafka-deployment
Since I'm new to Quarkus, I guess that the latter is required to instantiate a "KafkaLogHandlerRecorder" on startup. Ideally, the injection should happen at this stage.
Since the CDI container does not control the instantiation of a synthetic bean the dependency injection and other services (such as interceptors) are not supported. In other words, it’s up to the extension to provide all required services to a synthetic bean instance.
May this be the problem? Is "KafkaLogHandlerRecorder" a "synthetic bean"?
I'd be very grateful for any response.
Have good holidays,
Luca
I might be misreading the doc but it looks like we can only customize what an extension injects, not what we can inject into an extension? I'll ask around.
Hello,
thank you for this project, providing out-of-the-box Kafka Logging.
I'm having problem configuring the library.
Goal:
This library provides a default JSON formatter. Instead, I'd like to customize it. From my understanding, this is possibile extending the 'FormatterOrLayout', so that its implementation will be injected into "KafkaLogHandlerRecorder".
Problem:
This isn't happening and the application is always logging with default formatter. On startup, this library logs "No formatter or layout for kafka logger provided.", as confirmation that nothing was injected.
Scenario:
In the POM, both dependencies were added:
Since I'm new to Quarkus, I guess that the latter is required to instantiate a "KafkaLogHandlerRecorder" on startup. Ideally, the injection should happen at this stage.
I may be wrong, but the Quarkus documentation (https://quarkus.io/guides/writing-extensions#synthetic_beans( states:
May this be the problem? Is "KafkaLogHandlerRecorder" a "synthetic bean"?
I'd be very grateful for any response.
Have good holidays,
Luca
Could you help me on this? @thescouser89
The text was updated successfully, but these errors were encountered: