View Single Post
  #2 (permalink)  
Old 06-06-2007, 04:22 AM
Albert Albert is offline
Senior Member
 
Join Date: Jun 2007
Posts: 114
Albert is on a distinguished road
RE: Log4J, problem with Hibernate and Spring
To log you must do an instance of the Logger class, and then to put myLogger.info for level of info, debug for level of debug and so on.
Now if you don't see what does log in, maybe it's a .propierties configuration problem or perhaps you have log4j in level debug and you do logger.info and it doesn't show you because of that.

Log other things and do a log with that same level, thus must work…
Supposing that your .properties "key" are in package calls "data", you can use a code similar to this

Code:
String key = "key"; Properties prop = new Properties(); InputStream is = this.class.getResourceAsStream ("/data/config.properties"); prop.load (is); String val = prop.getProperty (key);
Albert
Reply With Quote