Hi Marc,

Thanks for the confirmation.

yes, I have started using separate loggers for them for now :).

regards
Balu

On Thu, Aug 31, 2017 at 1:35 PM, Marc Savy <marc.savy@redhat.com> wrote:
Hi Balu,

The Apiman Gateway does not have any support for injection. That's
only on the Apiman Manager side, I'm afraid (for performance reasons).

I understand the lack of easy logging availability in these components
is a point of frustration, and we will look to address that in a
future release.

A temporary workaround is to just directly use your logger of choice for now.

Regards,
Marc

On 28 August 2017 at 14:05, Balu S <sbalu27@gmail.com> wrote:
> Hello,
>
> 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.
>
> So I have tried to inject the ApimanLogger like below, but it always yields
> null. I have include the neccesary jar as "provided" scope in pom.xml.
>
>
> example:
> public class MyPolicyErrorWriter implements IPolicyErrorWriter{
>
> @Inject @ApimanLogger(MyPolicyErrorWriter.class)
> IApimanLogger logger;
>
> @Override
> public void write(ApiRequest request, Throwable error,
> IApiClientResponse response) {
>
>  // here logger is always null?
>             logger.info("
>          }
> ......
>
> Could you please suggest how can I add IApimanLogger to my custom error or
> failure writers ?
>
> Best regards
> Balu
>
> _______________________________________________
> Apiman-user mailing list
> Apiman-user@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/apiman-user
>