<div dir="ltr">Hi Marc,<div><br></div><div>Thanks for the confirmation.</div><div><br></div><div>yes, I have started using separate loggers for them for now :).</div><div><br></div><div>regards</div><div>Balu</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 31, 2017 at 1:35 PM, Marc Savy <span dir="ltr"><<a href="mailto:marc.savy@redhat.com" target="_blank">marc.savy@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Balu,<br>
<br>
The Apiman Gateway does not have any support for injection. That's<br>
only on the Apiman Manager side, I'm afraid (for performance reasons).<br>
<br>
I understand the lack of easy logging availability in these components<br>
is a point of frustration, and we will look to address that in a<br>
future release.<br>
<br>
A temporary workaround is to just directly use your logger of choice for now.<br>
<br>
Regards,<br>
Marc<br>
<div><div class="h5"><br>
On 28 August 2017 at 14:05, Balu S <<a href="mailto:sbalu27@gmail.com">sbalu27@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I have a custom error and failure writers that implements IPolicyErrorWriter<br>
> and IPolicyFailureWriter respectively. But these implementation methods does<br>
> not provide IPolicyContext object to access loggers. However this is<br>
> possible from IDataPolicy.<br>
><br>
> So I have tried to inject the ApimanLogger like below, but it always yields<br>
> null. I have include the neccesary jar as "provided" scope in pom.xml.<br>
><br>
><br>
> example:<br>
> public class MyPolicyErrorWriter implements IPolicyErrorWriter{<br>
><br>
> @Inject @ApimanLogger(<wbr>MyPolicyErrorWriter.class)<br>
> IApimanLogger logger;<br>
><br>
> @Override<br>
> public void write(ApiRequest request, Throwable error,<br>
> IApiClientResponse response) {<br>
><br>
> // here logger is always null?<br>
> <a href="http://logger.info" rel="noreferrer" target="_blank">logger.info</a>("<br>
> }<br>
> ......<br>
><br>
> Could you please suggest how can I add IApimanLogger to my custom error or<br>
> failure writers ?<br>
><br>
> Best regards<br>
> Balu<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Apiman-user mailing list<br>
> <a href="mailto:Apiman-user@lists.jboss.org">Apiman-user@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/apiman-user" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/apiman-user</a><br>
><br>
</blockquote></div><br></div>