5
5
package org .hibernate .boot ;
6
6
7
7
import org .hibernate .Internal ;
8
+ import org .hibernate .boot .jaxb .Origin ;
8
9
import org .hibernate .boot .model .relational .Namespace ;
9
10
import org .hibernate .internal .log .SubSystemLogging ;
10
11
11
- import java .io .File ;
12
- import java .io .FileNotFoundException ;
13
12
import java .lang .invoke .MethodHandles ;
14
13
15
- import org .hibernate .type .SerializationException ;
16
14
import org .jboss .logging .BasicLogger ;
17
15
import org .jboss .logging .Logger ;
18
16
import org .jboss .logging .annotations .Cause ;
19
17
import org .jboss .logging .annotations .LogMessage ;
20
18
import org .jboss .logging .annotations .Message ;
21
19
import org .jboss .logging .annotations .MessageLogger ;
22
20
import org .jboss .logging .annotations .ValidIdRange ;
21
+ import org .jboss .logging .annotations .ValidIdRanges ;
23
22
24
23
import static org .jboss .logging .Logger .Level .DEBUG ;
25
24
import static org .jboss .logging .Logger .Level .TRACE ;
26
25
import static org .jboss .logging .Logger .Level .WARN ;
27
- import static org .jboss .logging .Logger .Level .INFO ;
28
26
29
27
/**
30
28
* Logging related to Hibernate bootstrapping
34
32
description = "Logging related to bootstrapping of a SessionFactory / EntityManagerFactory"
35
33
)
36
34
@ MessageLogger (projectCode = "HHH" )
37
- @ ValidIdRange (min = 160101 , max = 160200 )
35
+ @ ValidIdRanges ({
36
+ @ ValidIdRange (min = 160101 , max = 160200 ),
37
+ @ ValidIdRange (min = 160201 , max = 160260 )
38
+ })
38
39
@ Internal
39
40
public interface BootLogging extends BasicLogger {
40
41
String NAME = SubSystemLogging .BASE + ".boot" ;
@@ -44,34 +45,6 @@ public interface BootLogging extends BasicLogger {
44
45
@ Message (id = 160101 , value = "Duplicate generator name %s" )
45
46
void duplicateGeneratorName (String name );
46
47
47
- @ LogMessage (level = INFO )
48
- @ Message (id = 160102 , value = "Reading mappings from file: %s" )
49
- void readingMappingsFromFile (String path );
50
-
51
- @ LogMessage (level = INFO )
52
- @ Message (id = 160103 , value = "Reading mappings from cache file: %s" )
53
- void readingCachedMappings (File cachedFile );
54
-
55
- @ LogMessage (level = WARN )
56
- @ Message (id = 160104 , value = "Could not deserialize cache file [%s]: %s" )
57
- void unableToDeserializeCache (String path , SerializationException error );
58
-
59
- @ LogMessage (level = WARN )
60
- @ Message (id = 160105 , value = "I/O reported error writing cached file: [%s]: %s" )
61
- void unableToWriteCachedFile (String path , String message );
62
-
63
- @ LogMessage (level = WARN )
64
- @ Message (id = 160106 , value = "Could not update cached file timestamp: [%s]" )
65
- @ SuppressWarnings ("unused" )
66
- void unableToUpdateCachedFileTimestamp (String path );
67
-
68
- @ LogMessage (level = WARN )
69
- @ Message (id = 160107 , value = "I/O reported cached file could not be found: [%s]: %s" )
70
- void cachedFileNotFound (String path , FileNotFoundException error );
71
-
72
- @ LogMessage (level = INFO )
73
- @ Message (id = 160108 , value = "Omitting cached file [%s] as the mapping file is newer" )
74
- void cachedFileObsolete (File cachedFile );
75
48
76
49
@ LogMessage (level = DEBUG )
77
50
@ Message (id = 160111 , value = "Package not found or no package-info.java: %s" )
@@ -268,10 +241,6 @@ public interface BootLogging extends BasicLogger {
268
241
@ Message (id = 160178 , value = "Mapping entity secondary table: %s -> %s" )
269
242
void mappingEntitySecondaryTableToTable (String entityName , String tableName );
270
243
271
- @ LogMessage (level = TRACE )
272
- @ Message (id = 160179 , value = "Writing cache file for: %s to: %s" )
273
- void writingCacheFile (String xmlPath , String serPath );
274
-
275
244
@ LogMessage (level = DEBUG )
276
245
@ Message (id = 160180 , value = "Unexpected ServiceRegistry type [%s] encountered during building of MetadataSources; may cause problems later attempting to construct MetadataBuilder" )
277
246
void unexpectedServiceRegistryType (String registryType );
@@ -340,4 +309,139 @@ public interface BootLogging extends BasicLogger {
340
309
ServiceRegistry passed to MetadataBuilder was a BootstrapServiceRegistry; \
341
310
this likely won't end well if attempt is made to build SessionFactory""" )
342
311
void badServiceRegistry ();
312
+
313
+ @ LogMessage (level = DEBUG )
314
+ @ Message (id = 160201 , value = "Unable to close cfg.xml resource stream" )
315
+ void unableToCloseCfgXmlResourceStream (@ Cause Throwable e );
316
+
317
+ @ LogMessage (level = DEBUG )
318
+ @ Message (id = 160202 , value = "Unable to close cfg.xml URL stream" )
319
+ void unableToCloseCfgXmlUrlStream (@ Cause Throwable e );
320
+
321
+ @ LogMessage (level = DEBUG )
322
+ @ Message (id = 160203 , value = "Unable to close properties file stream [%s]" )
323
+ void unableToClosePropertiesFileStream (String path , @ Cause Throwable e );
324
+
325
+ @ LogMessage (level = DEBUG )
326
+ @ Message (id = 160204 , value = "cfg.xml document did not define namespaces; wrapping in custom event reader to introduce namespace information" )
327
+ void cfgXmlDocumentDidNotDefineNamespaces ();
328
+
329
+ @ LogMessage (level = DEBUG )
330
+ @ Message (id = 160212 , value = "Unable to adjust relative <jar-file/> URL [%s] relative to root URL [%s]" )
331
+ void unableToAdjustRelativeJarFileUrl (String filePart , String rootPath , @ Cause Throwable e );
332
+
333
+ @ LogMessage (level = TRACE )
334
+ @ Message (id = 160213 , value = "JAR URL from URL Entry: %s >> %s" )
335
+ void jarUrlFromUrlEntry (String url , String jarUrl );
336
+
337
+ @ LogMessage (level = TRACE )
338
+ @ Message (id = 160217 , value = "Registering AttributeConverter '%s'" )
339
+ void registeringAttributeConverter (String converter );
340
+
341
+ @ LogMessage (level = DEBUG )
342
+ @ Message (id = 160218 , value = "Skipping registration of discovered AttributeConverter '%s' for auto-apply" )
343
+ void skippingRegistrationOfDiscoveredAttributeConverterForAutoApply (String converter );
344
+
345
+ @ LogMessage (level = DEBUG )
346
+ @ Message (id = 160219 , value = "Skipping duplicate '@ConverterRegistration' for '%s'" )
347
+ void skippingDuplicateConverterRegistration (String converter );
348
+
349
+ @ LogMessage (level = DEBUG )
350
+ @ Message (id = 160220 , value = "Removed potentially auto-applicable converter '%s' due to @ConverterRegistration" )
351
+ void removedPotentiallyAutoApplicableConverterDueToRegistration (String converter );
352
+
353
+ @ LogMessage (level = DEBUG )
354
+ @ Message (id = 160221 , value = "Overwrote existing registration [%s] for type definition." )
355
+ void overwroteExistingRegistrationForTypeDefinition (String name );
356
+
357
+ @ LogMessage (level = TRACE )
358
+ @ Message (id = 160222 , value = "Injecting JPA temp ClassLoader [%s] into BootstrapContext; was [%s]" )
359
+ void injectingJpaTempClassLoader (Object newLoader , Object oldLoader );
360
+
361
+ @ LogMessage (level = TRACE )
362
+ @ Message (id = 160223 , value = "Injecting ScanOptions [%s] into BootstrapContext; was [%s]" )
363
+ void injectingScanOptions (Object newOptions , Object oldOptions );
364
+
365
+ @ LogMessage (level = TRACE )
366
+ @ Message (id = 160224 , value = "Injecting ScanEnvironment [%s] into BootstrapContext; was [%s]" )
367
+ void injectingScanEnvironment (Object newEnv , Object oldEnv );
368
+
369
+ @ LogMessage (level = TRACE )
370
+ @ Message (id = 160225 , value = "Injecting Scanner [%s] into BootstrapContext; was [%s]" )
371
+ void injectingScanner (Object newScanner , Object oldScanner );
372
+
373
+ @ LogMessage (level = TRACE )
374
+ @ Message (id = 160226 , value = "Injecting ArchiveDescriptorFactory [%s] into BootstrapContext; was [%s]" )
375
+ void injectingArchiveDescriptorFactory (Object newFactory , Object oldFactory );
376
+
377
+ // Strategy selector tracing
378
+ @ LogMessage (level = TRACE )
379
+ @ Message (id = 160227 , value = "Strategy selector for %s: '%s' -> %s" )
380
+ void strategySelectorMapping (String strategySimpleName , String name , String implementationName );
381
+
382
+ @ LogMessage (level = TRACE )
383
+ @ Message (id = 160228 , value = "Strategy selector for %s: '%s' -> %s (replacing %s)" )
384
+ void strategySelectorMappingReplacing (String strategySimpleName , String name , String implementationName , String oldImplementationName );
385
+
386
+ @ LogMessage (level = DEBUG )
387
+ @ Message (id = 160229 , value = "Named strategy map did not exist on call to unregister" )
388
+ void namedStrategyMapDidNotExistOnUnregister ();
389
+
390
+ // LoadedConfig messages
391
+ @ LogMessage (level = DEBUG )
392
+ @ Message (id = 160230 , value = "Listener [%s] defined as part of a group also defined event type" )
393
+ void listenerDefinedAlsoDefinedEventType (String listenerClass );
394
+
395
+ @ LogMessage (level = DEBUG )
396
+ @ Message (id = 160231 , value = "More than one cfg.xml file attempted to supply SessionFactory name: [%s], [%s]. Keeping initially discovered one [%s]" )
397
+ void moreThanOneCfgXmlSuppliedSessionFactoryName (String first , String second , String keeping );
398
+
399
+ // Additional HBM binding traces
400
+ @ LogMessage (level = TRACE )
401
+ @ Message (id = 160233 , value = "Creating FetchProfile: %s" )
402
+ void creatingFetchProfile (String name );
403
+
404
+ @ LogMessage (level = TRACE )
405
+ @ Message (id = 160234 , value = "Processing <identifier-generator/> : %s" )
406
+ void processingIdentifierGenerator (String name );
407
+
408
+ @ LogMessage (level = TRACE )
409
+ @ Message (id = 160235 , value = "Processed type definition : %s -> %s" )
410
+ void processedTypeDefinition (String name , String impl );
411
+
412
+ @ LogMessage (level = TRACE )
413
+ @ Message (id = 160236 , value = "No temp ClassLoader provided; using live ClassLoader to load potentially unsafe class: %s" )
414
+ void noTempClassLoaderProvidedUsingLiveClassLoader (String className );
415
+
416
+ @ LogMessage (level = TRACE )
417
+ @ Message (id = 160237 , value = "Registering non-interface strategy : %s" )
418
+ void registeringNonInterfaceStrategy (String roleName );
419
+
420
+ @ LogMessage (level = TRACE )
421
+ @ Message (id = 160238 , value = "Indexing mapping document [%s] for purpose of building entity hierarchy ordering" )
422
+ void indexingMappingDocumentForHierarchyOrdering (String mappingDocumentName );
423
+
424
+ @ LogMessage (level = DEBUG )
425
+ @ Message (id = 160239 , value = "Applying filter definition with condition: %s" )
426
+ void applyingFilterDefinitionCondition (String condition );
427
+
428
+ @ LogMessage (level = TRACE )
429
+ @ Message (id = 160240 , value = "Processed filter definition: %s" )
430
+ void processedFilterDefinition (String name );
431
+
432
+ @ LogMessage (level = DEBUG )
433
+ @ Message (id = 160241 , value = "Entity supertype named as extends [%s] for subclass [%s:%s] not found" )
434
+ void entitySupertypeExtendsNotFound (String extendsName , Origin origin , String subclassName );
435
+
436
+ @ LogMessage (level = DEBUG )
437
+ @ Message (id = 160242 , value = "filter-def [name=%s, origin=%s] defined multiple conditions, accepting arbitrary one" )
438
+ void filterDefDefinedMultipleConditions (String name , String origin );
439
+
440
+ @ LogMessage (level = TRACE )
441
+ @ Message (id = 160243 , value = "Checking auto-apply AttributeConverter [%s] (domain-type=%s) for match against %s : %s.%s (type=%s)" )
442
+ void checkingAutoApplyAttributeConverter (String converterClass , String domainTypeSignature , String siteDescriptor , String declaringType , String memberName , String memberTypeName );
443
+
444
+ @ LogMessage (level = DEBUG )
445
+ @ Message (id = 160244 , value = "Skipping HBM processing of entity hierarchy [%s], as at least one entity [%s] has been processed" )
446
+ void skippingHbmProcessingOfEntityHierarchy (String rootEntityName , String processedEntity );
343
447
}
0 commit comments