Skip to content

Commit b77bd56

Browse files
committed
small fixes to new session/factory logging
1 parent 5a3af6b commit b77bd56

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE
11381138
*/
11391139
@Serial
11401140
private Object readResolve() throws InvalidObjectException {
1141-
SESSION_FACTORY_LOGGER.trace( "Resolving serialized factory" );
1141+
SESSION_FACTORY_LOGGER.resolvingSerializedFactory();
11421142
return locateSessionFactoryOnDeserialization( uuid, name );
11431143
}
11441144

hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryLogging.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
*/
2828
@SubSystemLogging(
2929
name = SessionFactoryLogging.NAME,
30-
description = "Logging related to SessionFactory lifecycle, serialization, and registry/JNDI operations"
30+
description = "Logging related to SessionFactory lifecycle and serialization"
3131
)
3232
@MessageLogger(projectCode = "HHH")
33-
@ValidIdRange(min = 90006001, max = 90006100)
33+
@ValidIdRange(min = 90020001, max = 90030000)
3434
@Internal
3535
public interface SessionFactoryLogging extends BasicLogger {
3636
String NAME = SubSystemLogging.BASE + ".factory";
@@ -44,7 +44,7 @@ public interface SessionFactoryLogging extends BasicLogger {
4444
void buildingSessionFactory();
4545

4646
@LogMessage(level = DEBUG)
47-
@Message(value = "Instantiating factory [%s] with settings: %s", id = 90006001)
47+
@Message(value = "Instantiating factory [%s] with settings: %s", id = 90020001)
4848
void instantiatingFactory(String uuid, Map<String, Object> settings);
4949

5050
@LogMessage(level = TRACE)
@@ -64,15 +64,15 @@ public interface SessionFactoryLogging extends BasicLogger {
6464
void alreadyClosed();
6565

6666
@LogMessage(level = DEBUG)
67-
@Message(value = "Closing factory [%s]", id = 90006005)
67+
@Message(value = "Closing factory [%s]", id = 90020005)
6868
void closingFactory(String uuid);
6969

7070
@LogMessage(level = DEBUG)
71-
@Message(value = "Serializing factory [%s]", id = 90006010)
71+
@Message(value = "Serializing factory [%s]", id = 90020010)
7272
void serializingFactory(String uuid);
7373

7474
@LogMessage(level = DEBUG)
75-
@Message(value = "Deserialized factory [%s]", id = 90006011)
75+
@Message(value = "Deserialized factory [%s]", id = 90020011)
7676
void deserializedFactory(String uuid);
7777

7878
@LogMessage(level = TRACE)
@@ -88,19 +88,19 @@ public interface SessionFactoryLogging extends BasicLogger {
8888
void resolvingSerializedFactory();
8989

9090
@LogMessage(level = TRACE)
91-
@Message("Resolved factory by UUID: %s")
91+
@Message("Resolved factory by UUID: [%s]")
9292
void resolvedFactoryByUuid(String uuid);
9393

9494
@LogMessage(level = TRACE)
95-
@Message("Resolved factory by name: %s")
95+
@Message("Resolved factory by name: '%s'")
9696
void resolvedFactoryByName(String name);
9797

9898
@LogMessage(level = TRACE)
9999
@Message("Resolving factory from deserialized session")
100100
void resolvingFactoryFromDeserializedSession();
101101

102102
@LogMessage(level = WARN)
103-
@Message(value = "Unable to construct current session context [%s]", id = 90006030)
103+
@Message(value = "Unable to construct current session context [%s]", id = 90020030)
104104
void unableToConstructCurrentSessionContext(String sessionContextType, @Cause Throwable throwable);
105105

106106
}

hibernate-core/src/main/java/org/hibernate/internal/SessionLogging.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
description = "Logging related to session lifecycle and operations"
3232
)
3333
@MessageLogger(projectCode = "HHH")
34-
@ValidIdRange(min = 90006101, max = 90006500)
34+
@ValidIdRange(min = 90010001, max = 90020000)
3535
@Internal
3636
public interface SessionLogging extends BasicLogger {
3737
String NAME = SubSystemLogging.BASE + ".session";
@@ -61,7 +61,7 @@ public interface SessionLogging extends BasicLogger {
6161
void closingSession(UUID sessionIdentifier);
6262

6363
@LogMessage(level = WARN)
64-
@Message(id = 90006101, value = "Closing shared session with unprocessed transaction completion actions")
64+
@Message(id = 90010101, value = "Closing shared session with unprocessed transaction completion actions")
6565
void closingSharedSessionWithUnprocessedTxCompletions();
6666

6767
@LogMessage(level = TRACE)
@@ -105,19 +105,19 @@ public interface SessionLogging extends BasicLogger {
105105
void afterTransactionCompletion(boolean successful, boolean delayed);
106106

107107
@LogMessage(level = ERROR)
108-
@Message(id = 90006102, value = "JDBC exception executing SQL; transaction rolled back")
108+
@Message(id = 90010102, value = "JDBC exception executing SQL; transaction rolled back")
109109
void jdbcExceptionThrownWithTransactionRolledBack(@Cause Exception e);
110110

111111
@LogMessage(level = DEBUG)
112-
@Message(id = 90006103, value = "Ignoring EntityNotFoundException for '%s.%s'")
112+
@Message(id = 90010103, value = "Ignoring EntityNotFoundException for '%s.%s'")
113113
void ignoringEntityNotFound(String entityName, Object id);
114114

115115
@LogMessage(level = WARN)
116-
@Message(id = 90006104, value = "Property '%s' is not serializable, value won't be set")
116+
@Message(id = 90010104, value = "Property '%s' is not serializable, value won't be set")
117117
void nonSerializableProperty(String propertyName);
118118

119119
@LogMessage(level = WARN)
120-
@Message(id = 90006105, value = "Property having key null is illegal, value won't be set")
120+
@Message(id = 90010105, value = "Property having key null is illegal, value won't be set")
121121
void nullPropertyKey();
122122

123123
@LogMessage(level = TRACE)
@@ -129,11 +129,11 @@ public interface SessionLogging extends BasicLogger {
129129
void deserializingSession(UUID sessionIdentifier);
130130

131131
@LogMessage(level = ERROR)
132-
@Message(id = 90006106, value = "Exception in interceptor beforeTransactionCompletion()")
132+
@Message(id = 90010106, value = "Exception in interceptor beforeTransactionCompletion()")
133133
void exceptionInBeforeTransactionCompletionInterceptor(@Cause Throwable e);
134134

135135
@LogMessage(level = ERROR)
136-
@Message(id = 90006107, value = "Exception in interceptor afterTransactionCompletion()")
136+
@Message(id = 90010107, value = "Exception in interceptor afterTransactionCompletion()")
137137
void exceptionInAfterTransactionCompletionInterceptor(@Cause Throwable e);
138138

139139
// StatelessSession-specific

0 commit comments

Comments
 (0)