-->
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: Logging
PostPosted: Mon Nov 19, 2007 7:07 am 
Beginner
Beginner

Joined: Wed Aug 27, 2003 6:15 am
Posts: 22
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1

Hi all

Hibernate uses log4j to do logging and at times logs messages at error level. An example is AbstractFlushingEventListener, which logs an error when it encounters a unique constraint violation.

The problem is that this logging does not take into account that the caller may be trapping and recovering from the problem, thereby printing error messages to the log "too early".

Our app has concurrent threads doing insertion and some insertions will be duplicated. We have code that catches the exception and clear the session (ie, pending updates). Unfortunately the log has already been imprinted.

For now we're upping the log level of Hibernate to FATAL but clearly it would be more desirable if the logs were never printed or at least at a much lower level.

Just my 2c.


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.