<div dir="ltr">Hello,<div><br></div><div>I have a custom error and failure writers that implements IPolicyErrorWriter and IPolicyFailureWriter respectively. But these implementation methods does not provide IPolicyContext object to access loggers. However this is possible from IDataPolicy.</div><div><br></div><div>So I have tried to inject the ApimanLogger like below, but it always yields null. I have include the neccesary jar as &quot;provided&quot; scope in pom.xml.</div><div><br></div><div><br></div><div><b>example:</b></div><div>public class MyPolicyErrorWriter implements IPolicyErrorWriter{<br></div><div><br></div><div><div><span style="white-space:pre">        </span> @Inject @ApimanLogger(MyPolicyErrorWriter.class) </div><div><span style="white-space:pre">        </span> IApimanLogger logger;</div></div><div><br></div><div><div><span style="white-space:pre">        </span>@Override</div><div><span style="white-space:pre">        </span>public void write(ApiRequest request, Throwable error, </div><div><span style="white-space:pre">                        </span>IApiClientResponse response) {</div></div><div><br></div><div> // here logger is always null?</div><div>            <a href="http://logger.info">logger.info</a>(&quot;</div><div>         }</div><div>......</div><div><br></div><div>Could you please suggest how can I add IApimanLogger to my custom error or failure writers ?<br></div><div><br></div><div>Best regards</div><div>Balu</div></div>