Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

hibernate logger

 
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

 
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 .
 
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
 
author and cow tipper
Posts: 5000
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 : )
 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic