@@ -367,8 +367,8 @@ public virtual object GetObject()
367
367
368
368
if ( targetName == null )
369
369
{
370
- logger . Warn ( "Using non-singleton proxies with singleton targets is often undesirable. " +
371
- "Enable prototype proxies by setting the 'targetName' property." ) ;
370
+ logger . LogWarning ( "Using non-singleton proxies with singleton targets is often undesirable. " +
371
+ "Enable prototype proxies by setting the 'targetName' property." ) ;
372
372
}
373
373
return NewPrototypeInstance ( ) ;
374
374
}
@@ -442,7 +442,7 @@ private object NewPrototypeInstance()
442
442
443
443
if ( logger . IsEnabled ( LogLevel . Debug ) )
444
444
{
445
- logger . Debug ( "Creating copy of prototype ProxyFactoryObject config: " + this ) ;
445
+ logger . LogDebug ( "Creating copy of prototype ProxyFactoryObject config: " + this ) ;
446
446
}
447
447
448
448
// The copy needs a fresh advisor chain, and a fresh TargetSource.
@@ -454,7 +454,7 @@ private object NewPrototypeInstance()
454
454
455
455
if ( logger . IsEnabled ( LogLevel . Debug ) )
456
456
{
457
- logger . Debug ( "Using ProxyConfig: " + copy ) ;
457
+ logger . LogDebug ( "Using ProxyConfig: " + copy ) ;
458
458
}
459
459
460
460
object generatedProxy = copy . CreateAopProxy ( ) . GetProxy ( ) ;
@@ -469,15 +469,15 @@ private void Initialize()
469
469
{
470
470
if ( logger . IsEnabled ( LogLevel . Debug ) )
471
471
{
472
- logger . Debug ( string . Format ( "Initialize: begin configure target, interceptors and introductions for {0}[{1}]" , GetType ( ) . Name , GetHashCode ( ) ) ) ;
472
+ logger . LogDebug ( string . Format ( "Initialize: begin configure target, interceptors and introductions for {0}[{1}]" , GetType ( ) . Name , GetHashCode ( ) ) ) ;
473
473
}
474
474
475
475
InitializeAdvisorChain ( ) ;
476
476
InitializeIntroductionChain ( ) ;
477
477
478
478
if ( logger . IsEnabled ( LogLevel . Debug ) )
479
479
{
480
- logger . Debug ( string . Format ( "Initialize: completed configuration for {0}[{1}]: {2}" , GetType ( ) . Name , GetHashCode ( ) , ToProxyConfigString ( ) ) ) ;
480
+ logger . LogDebug ( string . Format ( "Initialize: completed configuration for {0}[{1}]: {2}" , GetType ( ) . Name , GetHashCode ( ) , ToProxyConfigString ( ) ) ) ;
481
481
}
482
482
}
483
483
@@ -523,7 +523,7 @@ private void InitializeAdvisorChain()
523
523
524
524
if ( logger . IsEnabled ( LogLevel . Debug ) )
525
525
{
526
- logger . Debug ( "Adding global advisor '" + name + "'" ) ;
526
+ logger . LogDebug ( "Adding global advisor '" + name + "'" ) ;
527
527
}
528
528
529
529
AddGlobalAdvisor ( lof , name . Substring ( 0 , ( name . Length - GlobalInterceptorSuffix . Length ) ) ) ;
@@ -532,7 +532,7 @@ private void InitializeAdvisorChain()
532
532
{
533
533
if ( logger . IsEnabled ( LogLevel . Debug ) )
534
534
{
535
- logger . Debug ( "resolving advisor name " + "'" + name + "'" ) ;
535
+ logger . LogDebug ( "resolving advisor name " + "'" + name + "'" ) ;
536
536
}
537
537
538
538
// If we get here, we need to add a named interceptor.
@@ -558,15 +558,15 @@ private void AddAdvisorOnChainCreation(object advice, string name)
558
558
{
559
559
if ( logger . IsEnabled ( LogLevel . Debug ) )
560
560
{
561
- logger . Debug ( string . Format ( "Adding advisor list '{0}'" , name ) ) ;
561
+ logger . LogDebug ( string . Format ( "Adding advisor list '{0}'" , name ) ) ;
562
562
}
563
563
564
564
IAdvisors advisors = ( IAdvisors ) advice ;
565
565
foreach ( object element in advisors . Advisors )
566
566
{
567
567
if ( logger . IsEnabled ( LogLevel . Debug ) )
568
568
{
569
- logger . Debug ( string . Format ( "Adding advisor '{0}' of type {1}" , name , element . GetType ( ) . FullName ) ) ;
569
+ logger . LogDebug ( string . Format ( "Adding advisor '{0}' of type {1}" , name , element . GetType ( ) . FullName ) ) ;
570
570
}
571
571
572
572
IAdvisor advisor = NamedObjectToAdvisor ( element ) ;
@@ -577,7 +577,7 @@ private void AddAdvisorOnChainCreation(object advice, string name)
577
577
{
578
578
if ( logger . IsEnabled ( LogLevel . Debug ) )
579
579
{
580
- logger . Debug ( string . Format ( "Adding advisor '{0}' of type {1}" , name , advice . GetType ( ) . FullName ) ) ;
580
+ logger . LogDebug ( string . Format ( "Adding advisor '{0}' of type {1}" , name , advice . GetType ( ) . FullName ) ) ;
581
581
}
582
582
583
583
IAdvisor advisor = NamedObjectToAdvisor ( advice ) ;
@@ -679,7 +679,7 @@ private void InitializeIntroductionChain()
679
679
680
680
if ( logger . IsEnabled ( LogLevel . Debug ) )
681
681
{
682
- logger . Debug ( "Adding introduction '" + name + "'" ) ;
682
+ logger . LogDebug ( "Adding introduction '" + name + "'" ) ;
683
683
}
684
684
685
685
if ( name . EndsWith ( GlobalInterceptorSuffix ) )
@@ -783,7 +783,7 @@ private void AddGlobalIntroduction(IListableObjectFactory objectFactory, string
783
783
/// <param name="name">object name from which we obtained this object in our owning object factory</param>
784
784
private void AddIntroductionOnChainCreation ( object introduction , string name )
785
785
{
786
- logger . Debug ( $ "Adding introduction with name '{ name } '") ;
786
+ logger . LogDebug ( $ "Adding introduction with name '{ name } '") ;
787
787
IIntroductionAdvisor advisor = NamedObjectToIntroduction ( introduction ) ;
788
788
AddIntroduction ( advisor ) ;
789
789
}
@@ -797,7 +797,7 @@ private ITargetSource FreshTargetSource()
797
797
{
798
798
if ( logger . IsEnabled ( LogLevel . Debug ) )
799
799
{
800
- logger . Debug ( "Not Refreshing TargetSource: No target name specified" ) ;
800
+ logger . LogDebug ( "Not Refreshing TargetSource: No target name specified" ) ;
801
801
}
802
802
803
803
return TargetSource ;
@@ -807,7 +807,7 @@ private ITargetSource FreshTargetSource()
807
807
808
808
if ( logger . IsEnabled ( LogLevel . Debug ) )
809
809
{
810
- logger . Debug ( "Refreshing TargetSource with name '" + targetName + "'" ) ;
810
+ logger . LogDebug ( "Refreshing TargetSource with name '" + targetName + "'" ) ;
811
811
}
812
812
813
813
object target = objectFactory . GetObject ( targetName ) ;
@@ -830,7 +830,7 @@ private IList<IAdvisor> FreshAdvisorChain()
830
830
PrototypePlaceholder pa = ( PrototypePlaceholder ) advisor ;
831
831
if ( logger . IsEnabled ( LogLevel . Debug ) )
832
832
{
833
- logger . Debug ( string . Format ( "Refreshing advisor '{0}'" , pa . ObjectName ) ) ;
833
+ logger . LogDebug ( string . Format ( "Refreshing advisor '{0}'" , pa . ObjectName ) ) ;
834
834
}
835
835
836
836
AssertUtils . ArgumentNotNull ( objectFactory , "ObjectFactory" ) ;
@@ -862,7 +862,7 @@ private IList<IIntroductionAdvisor> FreshIntroductionChain()
862
862
PrototypePlaceholder pa = ( PrototypePlaceholder ) introduction ;
863
863
if ( logger . IsEnabled ( LogLevel . Debug ) )
864
864
{
865
- logger . Debug ( string . Format ( "Refreshing introduction '{0}'" , pa . ObjectName ) ) ;
865
+ logger . LogDebug ( string . Format ( "Refreshing introduction '{0}'" , pa . ObjectName ) ) ;
866
866
}
867
867
868
868
AssertUtils . ArgumentNotNull ( objectFactory , "ObjectFactory" ) ;
@@ -934,7 +934,7 @@ private IIntroductionAdvisor NamedObjectToIntroduction(object introduction)
934
934
/// </remarks>
935
935
protected override void InterfacesChanged ( )
936
936
{
937
- logger . Info ( "Implemented interfaces have changed; reseting singleton instance" ) ;
937
+ logger . LogInformation ( "Implemented interfaces have changed; reseting singleton instance" ) ;
938
938
singletonInstance = null ;
939
939
base . InterfacesChanged ( ) ;
940
940
}
@@ -967,7 +967,7 @@ private void CheckInterceptorNames()
967
967
targetName = finalName ;
968
968
if ( logger . IsEnabled ( LogLevel . Debug ) )
969
969
{
970
- logger . Debug ( string . Format ( "Object with name '{0}' concluding interceptor chain is not an advisor class: treating it as a target or TargetSource" , finalName ) ) ;
970
+ logger . LogDebug ( string . Format ( "Object with name '{0}' concluding interceptor chain is not an advisor class: treating it as a target or TargetSource" , finalName ) ) ;
971
971
}
972
972
String [ ] newNames = new String [ interceptorNames . Length - 1 ] ;
973
973
Array . Copy ( interceptorNames , 0 , newNames , 0 , newNames . Length ) ;
0 commit comments