Log4j HibernateProfilerAppender not sending data to profiler with Hibernate 3.3.x/4.1.x?

62 views
Skip to first unread message

Rupert Meindl

unread,
Feb 21, 2013, 12:30:48 PM2/21/13
to hibernate...@googlegroups.com
Hi, 

Trying out the Hibernate Profiler (Build 2132) with the Log4J adapter but it does seem that no information is actually sent to the running Profiler instance:
- Log4J Configuration exactly as described on Manual Config page
- Tried Hibernate 3.3.2 GA and 4.1.9 Final
- Trace level in Log4J for Hibernate is active, other appenders are working too
- Hibernate Profiler states that is connected (top left, "Recording" is active and "Connected" too)
- Setting HibernateProfiler.initialize() problematically although works without issues
- Application is hosted inside EAR running Glassfish 3.1.2 with JDK 6/64 bit

Any idea why the HibernateProfilerAppender seems to be connected but not sending any data? Is there a possibility to get more information from the appender what actually prevents it from working?
Sadly the problematically approach is not valid in my scenario.

Appreciate any helpful tips

Oren Eini (Ayende Rahien)

unread,
Feb 22, 2013, 8:06:02 AM2/22/13
to hibernate-profiler
You can use:

HibernateProfilerTrace.setTraceEnabled(true);

To get the stats.

Just to be sure that we are clear.

Just using the initialize() method works, right? It is the log4j config that you are having problems with?



--
You received this message because you are subscribed to the Google Groups "Hibernate Profiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hibernate-profi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rupert Meindl

unread,
Feb 26, 2013, 3:47:57 AM2/26/13
to hibernate...@googlegroups.com
Hi,

Correct, the issue is only with the Log4J appender. The appender class seems to be found by Log4J otherwise a warning would have occurred. And yes, initialize() works correct. Calling HibernateProfilerTrace.setTraceEnabled(true) in the code seems although not to have an effect on the Log4J appender ... no additional trace statements logged.

Thanks,

Rupert
To unsubscribe from this group and stop receiving emails from it, send an email to hibernate-profiler+unsub...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Feb 26, 2013, 4:05:23 AM2/26/13
to hibernate-profiler, Tomasz Pik
Okay, good so far.
Just to verify, which log4j version do you have on the class path, and do you have just one?


To unsubscribe from this group and stop receiving emails from it, send an email to hibernate-profi...@googlegroups.com.

Rupert Meindl

unread,
Feb 26, 2013, 11:59:35 AM2/26/13
to hibernate...@googlegroups.com, Tomasz Pik
Log4J is used in version 1.2.17, accessed by Slf4j 1.7.2 with the corresponding Slf4j-log4j12-1.7.2 adapter. These are the only JARs in the classpath for this EAR, the hosting Glassfish instance is not using Log4J/SLF4J, also no other deployed App so I am fairly  sure that that version will be used.
To unsubscribe from this group and stop receiving emails from it, send an email to hibernate-profiler+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Oren Eini (Ayende Rahien)

unread,
Feb 26, 2013, 10:22:54 PM2/26/13
to hibernate-profiler, Eric Hauser, Tomasz Pik
Tomas / Eric,
Any ideas?


To unsubscribe from this group and stop receiving emails from it, send an email to hibernate-profi...@googlegroups.com.

Eric Hauser

unread,
Feb 26, 2013, 11:48:35 PM2/26/13
to hibernate...@googlegroups.com, Eric Hauser, Tomasz Pik
If you turn on tracing, it is output directly to System.out.  You need to find the log file where standard out is written and trace statements will be there.
Reply all
Reply to author
Forward
0 new messages