Skip to content

Commit f5e756b

Browse files
committed
use CORE_LOGGER in Environment
1 parent a5b9d93 commit f5e756b

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

hibernate-core/src/main/java/org/hibernate/cfg/Environment.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@
55
package org.hibernate.cfg;
66

77
import java.io.IOException;
8-
import java.lang.invoke.MethodHandles;
98
import java.util.Properties;
109

1110
import org.hibernate.HibernateException;
1211
import org.hibernate.Internal;
1312
import org.hibernate.Version;
14-
import org.hibernate.internal.CoreMessageLogger;
15-
16-
import org.jboss.logging.Logger;
1713

14+
import static org.hibernate.internal.CoreMessageLogger.CORE_LOGGER;
1815
import static org.hibernate.internal.util.ConfigHelper.getResourceAsStream;
1916
import static org.hibernate.internal.util.config.ConfigurationHelper.maskOut;
2017

@@ -132,8 +129,6 @@
132129
@Internal
133130
public final class Environment implements AvailableSettings {
134131

135-
private static final CoreMessageLogger LOG = Logger.getMessageLogger( MethodHandles.lookup(), CoreMessageLogger.class, Environment.class.getName());
136-
137132
private static final Properties GLOBAL_PROPERTIES;
138133

139134
static {
@@ -145,19 +140,19 @@ public final class Environment implements AvailableSettings {
145140
try (var stream = getResourceAsStream("/hibernate.properties")) {
146141
try {
147142
GLOBAL_PROPERTIES.load(stream);
148-
LOG.propertiesLoaded( maskOut( GLOBAL_PROPERTIES,
143+
CORE_LOGGER.propertiesLoaded( maskOut( GLOBAL_PROPERTIES,
149144
PASS, JAKARTA_JDBC_PASSWORD, JPA_JDBC_PASSWORD ) );
150145
}
151146
catch (Exception e) {
152-
LOG.unableToLoadProperties();
147+
CORE_LOGGER.unableToLoadProperties();
153148
}
154149
}
155150
catch (IOException ioe) {
156-
LOG.unableToCloseStreamError( ioe );
151+
CORE_LOGGER.unableToCloseStreamError( ioe );
157152
}
158153
}
159154
catch (HibernateException he) {
160-
LOG.propertiesNotFound();
155+
CORE_LOGGER.propertiesNotFound();
161156
}
162157

163158
try {
@@ -170,7 +165,7 @@ public final class Environment implements AvailableSettings {
170165
}
171166
}
172167
catch (SecurityException se) {
173-
LOG.unableToCopySystemProperties();
168+
CORE_LOGGER.unableToCopySystemProperties();
174169
}
175170
}
176171

0 commit comments

Comments
 (0)