These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hiberlog issues
PostPosted: Tue Oct 20, 2009 1:55 pm 
Newbie

Joined: Wed Dec 29, 2004 2:37 pm
Posts: 3
Location: San Mateo, CA
I tried to see if HiberLog would replace the following error message with useful output:
Code:
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.

Hiberlog is at http://hiberlog.svn.sourceforge.net/viewvc/hiberlog/
I created an Eclipse project for HiberLog and built a jar. After generating the jar and including it in the original project, the warning message continues to be emitted. Any idea why?
The eclipse project will be available for a little while at http://www.slinnbooks.com/hiberlog.zip
Here is my log4j.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

   <!--
      See http://wiki.apache.org/logging-log4j/Log4jXmlFormat If you pass
      "-Dlog4j.debug" to Java then log4j will print out information to
      standard output telling how it is trying to configure itself.
   -->

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
   <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
      <param name="Target" value="System.out" />
      <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%d [%t] %-5p %c{2} (%F:%L) - %m%n" />
         <!-- <param name="ConversionPattern" value="(%F:%L).%M() %m%n" /> -->
      </layout>
   </appender>
<!--
    <appender name="file" class="org.apache.log4j.FileAppender">
        <param name="Append" value="false"/>
        <param name="File" value="c:/temp/log4j.out" />
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{HH:mm:ss.SSS} (%F:%L).%M() %m%n" />
        </layout>
    </appender>
-->
   <category name="com.mslinn">
      <priority value="warn" />
   </category>

   <category name="com.mslinn.lazy1">
      <priority value="warn" />
   </category>

    <category name="org.hibernate.cfg.annotations">
        <priority value="debug" />
    </category>

    <category name="org.hibernate.cfg.annotations.Version">
        <priority value="debug" />
    </category>

   <!-- set this to info or debug -->
   <logger name="trace">
      <level value="warn" />
   </logger>

   <root>
      <priority value="warn" />
      <appender-ref ref="stdout" />
   <!--    <appender-ref ref="file" />  -->
   </root>

</log4j:configuration>

Any ideas?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.