Well guys!
I finally made it... The problem was not with log4j, but with the EAR
generation of the legacy code I have here... >-(
Thanks for the help and for the hints! They'll be usefull in the future for
sure... :-D
rhaiger wrote:
>
> Hello guys, I'm new in this forum and I think you may help me with an
> issue...
>
> I'm trying to use log4j to log some login auditing informations, and I'm
> using JBoss 4 and Java with compliance level 5.0. It's a very old legacy
> system...
>
> I've added this lines at my log4j.xml:
>
> <appender name="AUDITOR"
> class="org.jboss.logging.appender.RollingFileAppender">
> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
>
>
>
>
> <layout class="org.apache.log4j.PatternLayout">
>
> </layout>
> </appender>
>
> <category name="com.itautec.siac.controleAcesso" additivity="false">
> <priority value="INFO"/>
> <appender-ref ref="AUDITOR"/>
> </category>
>
> And in my Foo.java class, I've added this field:
>
> private static final Logger logger = Logger.getLogger(Foo.class);
>
> When I want to log something (inside my Foo.java class), I just call my
> logger with something like:
>
> logger.info("any message");
>
>
> Well, after that, I start JBoss4, and I can see that Auditor.log file is
> created in my log folder, as it should be, but everything I try to log
> doesn't appear in my Auditor.log file... :-(
>
> When I start my application in debug mode, I can see that I'm passing
> through several loggers that I've put in my Foo.java class, but it seems
> that log4j is just ignoring these callings and nothing is logged at all...
>
> Does anyone know what's happening? It seems to be something really simple,
> but I can't figure it out! :-((
>
> Thanks from now and best regards! :-)
>
--
View this message in context:
http://old.nabble.com/Problems-with-log4j-configuration--SOLVED--tp33190553p33196579.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]