[Logging] Using FOP in JBoss

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Logging] Using FOP in JBoss

cbowditch
I'm trying to deploy an application based on the new FOP into a
Application Server JBoss. JBoss and FOP both use Commons Logging. The
messages generated by FOP are sent to the same log instance created by
JBoss. However, I want to send messages for FOP to an alternative Log
instance. What is the best way to achieve this?

Any suggestions will be appreciated.

Thanks,

Chris



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

Reply | Threaded
Open this post in threaded view
|

Re: [Logging] Using FOP in JBoss

Simon Kitching
On Thu, 2005-10-20 at 12:10 +0100, Chris Bowditch wrote:
> I'm trying to deploy an application based on the new FOP into a
> Application Server JBoss. JBoss and FOP both use Commons Logging. The
> messages generated by FOP are sent to the same log instance created by
> JBoss. However, I want to send messages for FOP to an alternative Log
> instance. What is the best way to achieve this?
>
> Any suggestions will be appreciated.

For normal containers, simply bundling commons-logging.jar in your
webapp's WEB-INF/lib dir will achieve this. However jboss do some very
weird things with their classloading in general, and further hacks for
their commons-logging integration.

I recommend that you consult the documentation at the jboss site for
this; I believe they have the necessary steps to configure jboss like
this quite well documented.

Regards,

Simon


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

Reply | Threaded
Open this post in threaded view
|

Re: [Logging] Using FOP in JBoss

Christian Hufgard
In reply to this post by cbowditch
Hi Chris,

think you should take a look into your
jboss/server/(minimal/default/full/whatver you use)/conf/log4j.xml
file. in there you can define whatever you want. maybey jboss uses
commons logging, but in the end this config files determines, where to
log what. at least at my installations it works this way.

greets

christian

Thursday, October 20, 2005, 1:10:13 PM, you wrote:

> I'm trying to deploy an application based on the new FOP into a
> Application Server JBoss. JBoss and FOP both use Commons Logging. The
> messages generated by FOP are sent to the same log instance created by
> JBoss. However, I want to send messages for FOP to an alternative Log
> instance. What is the best way to achieve this?

> Any suggestions will be appreciated.

> Thanks,

> Chris



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



--
Best regards,
 Christian                            mailto:[hidden email]


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

Reply | Threaded
Open this post in threaded view
|

Re: [Logging] Using FOP in JBoss

cbowditch
Christian Hufgard wrote:

> Hi Chris,
>
> think you should take a look into your
> jboss/server/(minimal/default/full/whatver you use)/conf/log4j.xml
> file. in there you can define whatever you want. maybey jboss uses
> commons logging, but in the end this config files determines, where to
> log what. at least at my installations it works this way.
>
> greets
>
> christian

Thanks Christian - you are right.




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

Reply | Threaded
Open this post in threaded view
|

Re: [Logging] Using FOP in JBoss

Simon Kitching
On Mon, 2005-10-24 at 08:44 +0100, Chris Bowditch wrote:

> Christian Hufgard wrote:
>
> > Hi Chris,
> >
> > think you should take a look into your
> > jboss/server/(minimal/default/full/whatver you use)/conf/log4j.xml
> > file. in there you can define whatever you want. maybey jboss uses
> > commons logging, but in the end this config files determines, where to
> > log what. at least at my installations it works this way.
> >
> > greets
> >
> > christian
>
> Thanks Christian - you are right.

The problem is that by this point everything is going to a single log4j
instance, meaning that there is no way to configure per-webapp logging
here.

Well, there is, sort of. JBoss have this odd hack where you can use a
custom log4j filter to filter out everything except messages coming from
a webapp at a specific "context path". That's really inefficient though.

It's much nicer to set up logging so it goes to *different* logging
library instances (ie ones deployed *within* the webapp) rather than to
a global instance which then filters out messages by context.

>From memory, both setups are reasonably well documented by jboss though.

Regards,

Simon


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