• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate logger

 
souha jerbi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have never used loggers, so i don't know when to call the log methods such as log.error , log.debug and so on . An other problem is that i don't know what are the most important informations that must be logged for hibernate : i don't know if i have to call log functions only when an exception is caught (when opening a session or a transaction) otherwise what are the events that should be logged
thanks a lot

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Logging is nothing but used for knowing information .

Just download the Log4j and place the jar inside the lib folder and use

Logger log = Logger.getLogger(Yourclassname.class);

This will work .
 
Bhagat Singh Rawat
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Pavan wrote:

Logging is nothing but used for knowing information .

Just download the Log4j and place the jar inside the lib folder and use

Logger log = Logger.getLogger(Yourclassname.class);

This will work .



For more information about Log4j please click on Log4J link

Log4J
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>log.error , log.debug

You call log.error when you want to log an error. You call log.debug when you want to log a message that might help debugging.

To use Hibernate, you don't actually need to know logging, although doing good logging is a good programming practice. But to get going with Hibernate, you don't actually have to write any code that inovkes the logger.

-Cameron McKenzie


 
souha jerbi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks everybody for your help : )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic