@@ -66,30 +66,36 @@ protected override TAssociate CreateAssociate<TKey, TAssociate>(out Type foundFo
66
66
// the comparer.
67
67
var comparer = base . CreateAssociate < TKey , IAdvancedComparerBase > ( out foundFor ) ;
68
68
if ( foundFor == null ) {
69
- CoreLog . Warning ( nameof ( Strings . LogCantFindAssociateFor ) ,
70
- TypeSuffixes . ToDelimitedString ( " \\ " ) ,
71
- typeof ( TAssociate ) . GetShortName ( ) ,
72
- typeof ( TKey ) . GetShortName ( ) ) ;
69
+ if ( CoreLog . IsLogged ( Orm . Logging . LogLevel . Warning ) ) {
70
+ CoreLog . Warning ( nameof ( Strings . LogCantFindAssociateFor ) ,
71
+ TypeSuffixes . ToDelimitedString ( " \\ " ) ,
72
+ typeof ( TAssociate ) . GetShortName ( ) ,
73
+ typeof ( TKey ) . GetShortName ( ) ) ;
74
+ }
73
75
return null ;
74
76
}
75
77
if ( foundFor == typeof ( TKey ) ) {
76
78
return ( TAssociate ) comparer ;
77
79
}
78
80
associate = BaseComparerWrapperType . Activate ( new [ ] { typeof ( TKey ) , foundFor } , ConstructorParams ) as TAssociate ;
79
81
if ( associate != null ) {
80
- CoreLog . Warning ( nameof ( Strings . LogGenericAssociateIsUsedFor ) ,
82
+ if ( CoreLog . IsLogged ( Orm . Logging . LogLevel . Warning ) ) {
83
+ CoreLog . Warning ( nameof ( Strings . LogGenericAssociateIsUsedFor ) ,
81
84
BaseComparerWrapperType . GetShortName ( ) ,
82
- typeof ( TKey ) . GetShortName ( ) ,
85
+ typeof ( TKey ) . GetShortName ( ) ,
83
86
foundFor . GetShortName ( ) ,
84
- typeof ( TKey ) . GetShortName ( ) ) ;
87
+ typeof ( TKey ) . GetShortName ( ) ) ;
88
+ }
85
89
return associate ;
86
90
}
87
91
else {
88
- CoreLog . Warning ( nameof ( Strings . LogGenericAssociateCreationHasFailedFor ) ,
92
+ if ( CoreLog . IsLogged ( Orm . Logging . LogLevel . Warning ) ) {
93
+ CoreLog . Warning ( nameof ( Strings . LogGenericAssociateCreationHasFailedFor ) ,
89
94
BaseComparerWrapperType . GetShortName ( ) ,
90
- typeof ( TKey ) . GetShortName ( ) ,
95
+ typeof ( TKey ) . GetShortName ( ) ,
91
96
foundFor . GetShortName ( ) ,
92
- typeof ( TKey ) . GetShortName ( ) ) ;
97
+ typeof ( TKey ) . GetShortName ( ) ) ;
98
+ }
93
99
return null ;
94
100
}
95
101
}
0 commit comments