From 555e229cc220aeb3680c111d5cac6a1cb77a93f7 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Mon, 17 Nov 2014 15:58:04 +0000 Subject: [PATCH] HHH-9508 Improve trace logging in ActionQueue --- .../main/java/org/hibernate/engine/spi/ActionQueue.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java index 7191d23405..6ed62fd48b 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java @@ -667,14 +667,19 @@ public class ActionQueue { * @throws ClassNotFoundException Generally means we were unable to locate user classes. */ public static ActionQueue deserialize(ObjectInputStream ois, SessionImplementor session) throws IOException, ClassNotFoundException { - LOG.trace( "Deserializing action-queue" ); + final boolean traceEnabled = LOG.isTraceEnabled(); + if ( traceEnabled ) { + LOG.trace( "Deserializing action-queue" ); + } ActionQueue rtn = new ActionQueue( session ); rtn.unresolvedInsertions = UnresolvedEntityInsertActions.deserialize( ois, session ); for ( ExecutableList l : rtn.executableLists ) { l.readExternal( ois ); - LOG.tracev( "Deserialized [{0}] entries", l.size() ); + if ( traceEnabled ) { + LOG.tracev( "Deserialized [{0}] entries", l.size() ); + } l.afterDeserialize( session ); }