<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">&lt;<a href="mailto:marc.savy@redhat.com" target="_blank">marc.savy@redhat.com</a>&gt;</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&#39;s<br>
only on the Apiman Manager side, I&#39;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 &lt;<a href="mailto:sbalu27@gmail.com">sbalu27@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I have a custom error and failure writers that implements IPolicyErrorWriter<br>
&gt; and IPolicyFailureWriter respectively. But these implementation methods does<br>
&gt; not provide IPolicyContext object to access loggers. However this is<br>
&gt; possible from IDataPolicy.<br>
&gt;<br>
&gt; So I have tried to inject the ApimanLogger like below, but it always yields<br>
&gt; null. I have include the neccesary jar as &quot;provided&quot; scope in pom.xml.<br>
&gt;<br>
&gt;<br>
&gt; example:<br>
&gt; public class MyPolicyErrorWriter implements IPolicyErrorWriter{<br>
&gt;<br>
&gt; @Inject @ApimanLogger(<wbr>MyPolicyErrorWriter.class)<br>
&gt; IApimanLogger logger;<br>
&gt;<br>
&gt; @Override<br>
&gt; public void write(ApiRequest request, Throwable error,<br>
&gt; IApiClientResponse response) {<br>
&gt;<br>
&gt;  // here logger is always null?<br>
&gt;             <a href="http://logger.info" rel="noreferrer" target="_blank">logger.info</a>(&quot;<br>
&gt;          }<br>
&gt; ......<br>
&gt;<br>
&gt; Could you please suggest how can I add IApimanLogger to my custom error or<br>
&gt; failure writers ?<br>
&gt;<br>
&gt; Best regards<br>
&gt; Balu<br>
&gt;<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; Apiman-user mailing list<br>
&gt; <a href="mailto:Apiman-user@lists.jboss.org">Apiman-user@lists.jboss.org</a><br>
&gt; <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>
&gt;<br>
</blockquote></div><br></div>