<div dir="ltr">Thank you for the tip, that was very helpful!<br><div> TBH I wasn't aware of StatusListeners... I added an OnConsoleStatusListener in logback.xml, as I mentioned this appender is added to Kafka Connect - which we have running in Kubernetes - and messages started showing up (albeit with a delay, which I think is due to fact that I'm logging in the callback passed to Kafka produce().</div><div>So, for my understanding, any statuses added during appender start() are picked up and shown, but statuses added during append() are not shown _unless_ you explicitly add a status listener, is that correct?</div><div><br></div><div>Thanks again for your help, kind regards, Ton<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 6, 2023 at 1:00 PM Ceki Gülcü via logback-user <<a href="mailto:logback-user@qos.ch">logback-user@qos.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Ton,<br>
<br>
Have you tried adding a statusListener on the command line?<br>
<br>
See <a href="https://logback.qos.ch/manual/configuration.html#logback.statusLC" rel="noreferrer" target="_blank">https://logback.qos.ch/manual/configuration.html#logback.statusLC</a><br>
<br>
StatusListeners should work the same way in logback version 1.2.<br>
<br>
Let us know if this helps,<br>
<br>
-- <br>
Ceki Gülcü<br>
<br>
Sponsoring SLF4J/logback/reload4j at <a href="https://github.com/sponsors/qos-ch" rel="noreferrer" target="_blank">https://github.com/sponsors/qos-ch</a><br>
<br>
On 7/5/2023 11:14 PM, Ton van Bart via logback-user wrote:<br>
> Hello,<br>
> I have created a custom Logback appender which sends the log events to a<br>
> Kafka topic. In order to verify if producing to Kafka was successful, I<br>
> check the result and do an addWarn("Failed to produce logging", e) if<br>
> there was an exception.<br>
> Similarly, I tried to add an addInfo("produced offset:" +<br>
> matadata.offset()) when a produce is successful.<br>
> <br>
> I'm using this appender in Kafka Connect, where I have wrapped it in an<br>
> AsyncAppender; however, neither message is showing. I also tried<br>
> printing to System.out / System.err from within the appender with the<br>
> same (lack of) result: during start up of Connect, I do see addInfo()<br>
> messages, but during normal processing, everything goes silent. No<br>
> messages appear on the topic so I assume something went wrong; when<br>
> testing the setup in a local docker compose, it works, so there must be<br>
> some problem somewhere.<br>
> <br>
> I understand that this may be due to the combination with Kafka Connect,<br>
> my question is: should I expect addInfo() etc. to show up in normal<br>
> appender processing (i.e. calling it from within append() or is this<br>
> internal logging for use only in appender start() ? What would be the<br>
> standard way for an appender to report errors during append()?<br>
> <br>
> Note: due to circumstances beyond my control, I'm currently stuck on<br>
> Logback 1.2.11 .<br>
> <br>
> Thanks in advance for any tips, kind regards, Ton<br>
> <br>
> _______________________________________________<br>
> logback-user mailing list<br>
> <a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a><br>
> <a href="https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-user" rel="noreferrer" target="_blank">https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-user</a><br>
_______________________________________________<br>
logback-user mailing list<br>
<a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a><br>
<a href="https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-user" rel="noreferrer" target="_blank">https://mailman.qos.ch/cgi-bin/mailman/listinfo/logback-user</a></blockquote></div>