Setting interceptor param on package level

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Setting interceptor param on package level

Norbert Harrer
Hi.

A question just out of curiosity. Is it possible to set an interceptor
parameter on the package level.

For example I have a couple interceptor stacks more or less like this:

<interceptor-stack name="myParamsPrepareParamsStack">
     <interceptor-ref name="logger" />
     <interceptor-ref name="i18n"/>
     <interceptor-ref name="sprache"/>
     <interceptor-ref name="paramsPrepareParamsStack">
         <param name="exception.logEnabled">true</param>
         <param name="exception.logLevel">ERROR</param>
     </interceptor-ref>
     <interceptor-ref name="init" />
</interceptor-stack>

I want the Parameters for the ExceptionMappingInterceptor to be present
in all interceptor stacks:

<param name="exception.logEnabled">true</param>
<param name="exception.logLevel">ERROR</param>

Is it possible to set them somewhere just once on a global or package level?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Setting interceptor param on package level

Lukasz Lenart
2017-07-29 10:26 GMT+02:00 Norbert Harrer <[hidden email]>:

> Hi.
>
> A question just out of curiosity. Is it possible to set an interceptor
> parameter on the package level.
>
> For example I have a couple interceptor stacks more or less like this:
>
> <interceptor-stack name="myParamsPrepareParamsStack">
>     <interceptor-ref name="logger" />
>     <interceptor-ref name="i18n"/>
>     <interceptor-ref name="sprache"/>
>     <interceptor-ref name="paramsPrepareParamsStack">
>         <param name="exception.logEnabled">true</param>
>         <param name="exception.logLevel">ERROR</param>
>     </interceptor-ref>
>     <interceptor-ref name="init" />
> </interceptor-stack>
>
> I want the Parameters for the ExceptionMappingInterceptor to be present in
> all interceptor stacks:
>
> <param name="exception.logEnabled">true</param>
> <param name="exception.logLevel">ERROR</param>
>
> Is it possible to set them somewhere just once on a global or package level?

You should be able to create a basic interceptors stack and use it in
your other stacks, so you can configure all the parameters in the
basic stack.


Regards
--
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...