@@ -66,30 +66,36 @@ protected override TAssociate CreateAssociate<TKey, TAssociate>(out Type foundFo
6666 // the comparer.
6767 var comparer = base . CreateAssociate < TKey , IAdvancedComparerBase > ( out foundFor ) ;
6868 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+ }
7375 return null ;
7476 }
7577 if ( foundFor == typeof ( TKey ) ) {
7678 return ( TAssociate ) comparer ;
7779 }
7880 associate = BaseComparerWrapperType . Activate ( new [ ] { typeof ( TKey ) , foundFor } , ConstructorParams ) as TAssociate ;
7981 if ( associate != null ) {
80- CoreLog . Warning ( nameof ( Strings . LogGenericAssociateIsUsedFor ) ,
82+ if ( CoreLog . IsLogged ( Orm . Logging . LogLevel . Warning ) ) {
83+ CoreLog . Warning ( nameof ( Strings . LogGenericAssociateIsUsedFor ) ,
8184 BaseComparerWrapperType . GetShortName ( ) ,
82- typeof ( TKey ) . GetShortName ( ) ,
85+ typeof ( TKey ) . GetShortName ( ) ,
8386 foundFor . GetShortName ( ) ,
84- typeof ( TKey ) . GetShortName ( ) ) ;
87+ typeof ( TKey ) . GetShortName ( ) ) ;
88+ }
8589 return associate ;
8690 }
8791 else {
88- CoreLog . Warning ( nameof ( Strings . LogGenericAssociateCreationHasFailedFor ) ,
92+ if ( CoreLog . IsLogged ( Orm . Logging . LogLevel . Warning ) ) {
93+ CoreLog . Warning ( nameof ( Strings . LogGenericAssociateCreationHasFailedFor ) ,
8994 BaseComparerWrapperType . GetShortName ( ) ,
90- typeof ( TKey ) . GetShortName ( ) ,
95+ typeof ( TKey ) . GetShortName ( ) ,
9196 foundFor . GetShortName ( ) ,
92- typeof ( TKey ) . GetShortName ( ) ) ;
97+ typeof ( TKey ) . GetShortName ( ) ) ;
98+ }
9399 return null ;
94100 }
95101 }
0 commit comments