Quoting "Harp, George" <[EMAIL PROTECTED]>:

> Modify Jboss' log4j.xml would seem to be the easiest solution.
>

Unfortunately, it's not that simple if one is trying to use the Log4j-1.3
specific configuration rolling policies and such which don't exist in 1.2. 
However, now that Log4j-1.3 has been made, for the most part, compatible with
1.2, you can use the old 1.2 config with 1.3.  So, if Darshan is willing to do
that and/or go back to using Log4j-1.2.x, then problem solved.

Keep in mind there is one other issue here; separation of logger repositories. 
Or, even, separation of Log4j instances.  The latter is problematic in JBoss
with its unified classloader.  The former can be done using a
JNDIContextSelector repository selector.  This exists in Log4j-1.3.  So, each
app can have the ability to have separate configurations from the server while
using a single Log4j.jar provided at the server level.  I would tend to go this
route.  Switch out JBoss' log4j version with Log4j-1.3.  Sepecifiy the selector
on the command line (sorry, can't remember the name of the -D parameter for
this  ATM) when starting Log4j.  You'll probably have to manually configure
Log4j for each separate logger repository, especially if the unified
classloader won't allow for child-first classloading (although I believe there
is supposed to be an option for this... but I've heard its a bit problematic).


Jake

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of darshan
> Sent: Tuesday, November 22, 2005 3:47 AM
> To: log4j-user@logging.apache.org
> Subject: override the log4j.xml and log4j.jar already present in Jboss
> 4.0.2
>
> Hi,
> I am new to log4j.
> My problem is....
> the Jboss 4.0.2 use lo4j 1.2 and has its own config file called
> log4j.xml My application log is based on log4j 1.3-alpha and has
> features like rollingfile policy and etc...
> So when i deploy my application in the Jboss the logger is following the
> Jboss's log4j jar i.e 1.2 version and at the same time using the
> log4j.xml set by default in the Jboss for its personal logging...
> So how to overcoome JBoss's log4j.jar and log4j.xml.. to use the one i
> am providing.. along with my app in the .ear??
> Plz gimme a solution asap
> regards,
> darshan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to