geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhi Xie <daxie...@gmail.com>
Subject Re: geronimo 3.0 application specific logging
Date Mon, 15 Oct 2012 08:41:18 GMT
Confirmed with my friend. It will fail to load your own log property file
if you don't adding <hidden-classes> or <import-package> into your
geronimo-web.xml.
The rule is one log4j with one property file. So if you decide to use your
own log property file, you must have one copy of log4j in your application.
There is the other solution for you concern. It is to use the server's
log4j copy, and add you log setting into
<geronimo-home>\var\log\server-log4j.properties. You can distinguish you
log setting with the server's one by package level appender. For example,
If your application name is testA, and the source package is com.XXX.testA.

log4j.logger.com.XXX.testA=INFO, testA

log4j.appender.testA=org.apache.log4j.RollingFileAppender
log4j.appender.testA.File=c:\logs\testA.log
log4j.appender.testA.Threshold=TRACE
log4j.appender.testA.layout=org.apache.log4j.PatternLayout
log4j.appender.testA.layout.ConversionPattern=[%d]-%-5p (%F:%L)|%m%n
log4j.appender.testA.DatePattern='.'yyyy-MM-dd


2012/10/15 Zhi Xie <daxiezhi@gmail.com>

> Currently I don't know how to use the application's log property file
> without adding <hidden-classes> or <import-package>.
> But I know if you want to use one copy of log4j librarry in the server and
> share it with all application in the server, you can use the SharedLib
> feature.
> I mean use the <import-package> and SharedLib feature.
>
> I'm interesting to your problem, and continue to investigate the root
> cause.
>
>
> 2012/10/12 jcyim <jongchoul@gmail.com>
>
>> hello.
>> I'm trying to use application specific log.
>> So I have followed instructions in geronimo manual pages.
>> but, I failed.
>> Geronimo never reads my applicaiton's log property file.
>> I have tried to use <hidden-classes> and/or <import-package>
>> but the result was same. it didn't work. I could not hide geronimos's
>> logging classes.
>>
>> The only way I was successful is to include my log4j library files in my
>> web
>> applications.
>> Even though, it was successful, I thinks that way is very unefficient
>> because every single wep application neet to include logj4j librarry in
>> self.
>>
>> can you please help me?
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-geronimo.328035.n3.nabble.com/geronimo-3-0-application-specific-logging-tp3985902.html
>> Sent from the Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Best Regards
> Gary
>
>


-- 
Best Regards
Gary

Mime
View raw message