geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Waldo Ramírez Montaño <waldo.rami...@correo.unam.mx>
Subject Re: Logging in Geronimo 2.0.1
Date Thu, 06 Sep 2007 17:35:34 GMT

Yep, that way works (at least in individual log-file creation).
Thanks!
Waldo


Waldo Ramírez Montaño wrote:
> 
> Thanks for your answer,
> 
> But that's the problem  :(
> Previously, an app in Geronimo 1.1.1 worked ok and it creates the log as
> you described, but in Geronimo 2.0.1... the same config didn't work!!!
> Even I've tested inverse classloading in Geronimo's deployment descriptor
> and the same.
> 
> I'll compare your xml with mine; thanks again.
> Waldo
> 
> 
> 
> Xh wrote:
>> 
>> Hi,
>> 
>> You can use Your own Log4j configuration in your applications (to tell
>> the truth I've only used it in WAR).
>> 
>> Below is my configuration that works with WAS-CE (based on Geronimo 1.1).
>> It should also work on G2.0.1 (I have G2.0.1, but I haven't migrated the
>> project, yet).
>> 
>> Place Your own log4j.xml and log4j.dtd in e.g. WEB-INF/classes directory
>> (it must be on the class path). Add log4j librarry to Your project
>> WEB-INF/lib.
>> 
>> To load new instance of Log4J Logger and all other classes, You need to
>> inform Geronimo that
>> You want Your own classes to be loaded, in deployment file e.g.
>> geronimo-web.ml in <environment> add this:
>> 
>> <hidden-classes>
>>             <filter>org.apache.log4j</filter>
>> </hidden-classes>
>> 
>> Geronimo will load Your classes from org.apache.log4j package (including
>> sub-packages).
>> 
>> My log4j.xml looks sth like this:
>> 
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>> <log4j:configuration>
>>     <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
>>         
>>         <layout class="org.apache.log4j.PatternLayout">
>>             
>>         </layout>
>>         <filter class="org.apache.log4j.varia.LevelRangeFilter">
>>             
>>             
>>         </filter>
>>     </appender>
>>     <appender name="stderr" class="org.apache.log4j.ConsoleAppender">
>>         
>>         <layout class="org.apache.log4j.PatternLayout">
>>             
>>         </layout>
>>         <filter class="org.apache.log4j.varia.LevelRangeFilter">
>>             
>>             
>>         </filter>
>>     </appender>
>> <appender name="file"
>>         class="org.apache.log4j.DailyRollingFileAppender">
>>         
>>         
>>         
>>         <layout class="org.apache.log4j.PatternLayout">
>>             
>>         </layout>
>>     </appender>
>> 
>>     <root>
>>         <level value="all" />
>>         <appender-ref ref="stdout" />
>>         <appender-ref ref="stderr" />
>>         <appender-ref ref="file" />
>>     </root>
>> </log4j:configuration>
>> 
>> And now all logs of Your application will be logged into:
>> 
>> ${org.apache.geronimo.server.dir}/var/log/Log4jTest.log
>> 
>> It works perfect ;)
>> 
>> best regards
>> Łukasz
>> 
>> ----- Original Message ----
>> From: Waldo Ramírez Montaño <waldo.ramirez@correo.unam.mx>
>> To: user@geronimo.apache.org
>> Sent: Monday, 3 September, 2007 8:14:09 PM
>> Subject: Logging in Geronimo 2.0.1
>> 
>> 
>> Hello,
>> 
>> Is it possible that deployments (EJB's, WAR's, EAR's) have their own
>> log-files in Geronimo 2.0.1?
>> 
>> Thanks again,
>> Waldo
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/Logging-in-Geronimo-2.0.1-tf4373488s134.html#a12465934
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>> 
>> 
>> 
>> 
>> 
>> 
>>       ___________________________________________________________ 
>> Want ideas for reducing your carbon footprint? Visit Yahoo! For Good 
>> http://uk.promotions.yahoo.com/forgood/environment.html
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Logging-in-Geronimo-2.0.1-tf4373488s134.html#a12527605
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message