In some cases, in trace log level, EntityPrinter might be called with an entity name not consistent with the passed object. This can happen for instance here: https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/test/naturalid/inheritance/cache/InheritedNaturalIdCacheTest.java#L65 It's just a test but it could also happen in an application doing the wrong thing, which is probably when you will try to use the trace log level. |