This content has been marked as final.
Show 2 replies
-
1. Re: Custom LogProvider
genman Apr 1, 2009 1:36 AM (in response to bobthule)I took a look and you're right. Not sure what you could do here. Maybe use
@In
for injecting your own log component? -
2. Re: Custom LogProvider
bobthule Apr 3, 2009 7:58 PM (in response to bobthule)Yeah, I thought about that too, but using @In doesn't do the extra work that the @Logging annotation does to set the logging implentations' category with the containing class's Class name.
Without that extra work, you would have to pass the category in every call to the custom logging implementation. ie:
class TestAction { @In MyLog log; ... public void test() { log.debug(TestAction.class, "It would be a bummer to have to pass the TestAction.class in on every call!"); } }
vs
class TestAction { @Logging Log log; ... public void test() { log.debug("This is more like it. But how do I use this with my own LoggingProvider"); } }