I've tried to add a Request Filter (T 5.3.4)
In my module, I've added this :
and my filter is:
But my filter is not called (I see not log).
However, if I declare my filter with :
filters.add("myRequestFilter", new MyRequestFilter(log),
"after:CheckForUpdates");
it works !
So, what
Sorry, I was mistaken: lit does note work when I use:
filters.addInstance("myRequestFilter", MyRequestFilter.class,
"after:CheckForUpdates")
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Request-Filter-not-called-if-declared-with-addInstance-vs-add-tp5715859p5715863.
Yes, my Logger is a org.slf4j.Logger.
2012/8/29 Lance Java [via Tapestry] <
ml-node+s1045711n5715870...@n5.nabble.com>
> addInstance will invoke the constructor with the most arguments on the
> given class. It will pass all arguments from the registry that match by
> type (and additional annotati
Thanks a lot; but, in fact, the issue is not with constraints; with
"after:CheckForUpdates,before:URLRewriter" the behavior is the same.
In fact, it has to do with parameter injection, as you supposed : with
addInstance, I see no log, but the code is executed.
--
View this message in context:
It's an issue with log levels :
when logger is @Inject'ed in my module and used as new myRequestFilter()
parameter, it logs at trace level.
when logger is injected as a parameter (when I use addInstance), it logs at
"info" level ?!
--
View this message in context:
http://tapestry.1045711.n5.na
I think I got It:
- when logger is @Inject'ed in my module and passed as my filter constructor
parameter, the messages are logged in the name of my module class
- when logger is automatically injected in my filter, the messages are
logged in the name of
"org.apache.tapestry5.services.TapestryModule
So, is there any mean to log onto the real class when a logger in injected in
that class ?
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Request-Filter-not-called-if-declared-with-addInstance-vs-add-tp5715859p5715964.html
Sent from the Tapestry - User mailing list archi