-
1. Re: Help needed for Logging SAR files
jaikiran Nov 10, 2006 2:40 AM (in response to riji)You can add your appenders/loggers in the log4j.xml that comes in JBoss(this is the easiest approach). Its present in the %JBOSS_HOME%/server/default/conf folder
-
2. Re: Help needed for Logging SAR files
riji Nov 10, 2006 3:40 AM (in response to riji)Hi Jaikiran,
Appreciate your help.
We want the container level (/default/lib) "log4j.jar" to log messages. We have our application level log4j.xml which has defined appenders/loggers. The logs are picked up now, but only following message is logged.
[10 Nov 2006 - 10:54:58] - This is used for testing.
I want to get the Log levels here. Could it be possibe to put it in a better way.
Regards,
Rijil -
3. Re: Help needed for Logging SAR files
jaikiran Nov 10, 2006 4:20 AM (in response to riji)Can you post the contents of your log4j.xml(Remember to use the "Code" button to wrap the contents in a code block while posting).
-
4. Re: Help needed for Logging SAR files
riji Nov 14, 2006 8:09 AM (in response to riji)hi Jaikiran, Sorry for late reply.
Here is my log4j.xml
<?xml version="1.0" encoding="UTF-8"?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender-ref ref="test"/>
<appender-ref ref="SunAm"/>
</log4j:configuration>
I have 2 appenders and I want my logs to go to both the log files. This is not happeneing. Only to ${jboss.server.home.dir}/log/test.log the logs are written. the other appender is at container level.
My SAR structure is given below.
SAR
com-all class files
log4j.xml
META-INF/jboss-service.xml
WEB-INF/web.xml
WEB-INF/lib- all jars
It would be very grateful if you would be able to help me in this regard.
Thanks in advance -
5. Re: Help needed for Logging SAR files
riji Nov 14, 2006 8:11 AM (in response to riji)<?xml version="1.0" encoding="UTF-8"?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender-ref ref="test"/>
<appender-ref ref="SunAm"/>
</log4j:configuration> -
6. Re: Help needed for Logging SAR files
riji Nov 14, 2006 8:12 AM (in response to riji)<?xml version="1.0" encoding="UTF-8"?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
1.
2
3
4
5
6
7
8
9
10
11
12
13 <appender-ref ref="bcc"/>
14 <appender-ref ref="QuantumSunAm"/>
15
16</log4j:configuration> -
7. Re: Help needed for Logging SAR files
peterj Nov 14, 2006 11:12 AM (in response to riji)Enclose your code within [ code ] ... [ /code ] tags (without the spaces). Or select the code and click on the Code button.