File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
src/NLog.Extensions.Logging Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -74,25 +74,32 @@ private static void ConfigureHiddenAssemblies()
7474 try
7575 {
7676 //ignore these assemblies for ${callsite}
77- #if ! NETCORE1_0
78- LogManager . AddHiddenAssembly ( typeof ( Microsoft . Extensions . Logging . ILoggingBuilder ) . GetTypeInfo ( ) . Assembly ) ; //Microsoft.Logging
77+ InternalLogger . Trace ( "Hide assemblies for callsite" ) ;
78+
79+ #if NETCORE1_0
80+ LogManager . AddHiddenAssembly ( Assembly . Load ( new AssemblyName ( "Microsoft.Logging" ) ) ) ;
7981#endif
80- LogManager . AddHiddenAssembly ( typeof ( Microsoft . Extensions . Logging . LoggerFactoryExtensions ) . GetTypeInfo ( ) . Assembly ) ; //Microsoft.Extensions.Logging
81- LogManager . AddHiddenAssembly ( typeof ( Microsoft . Extensions . Logging . ILogger ) . GetTypeInfo ( ) . Assembly ) ; // Microsoft.Extensions.Logging.Abstractions
82- LogManager . AddHiddenAssembly ( typeof ( NLog . Extensions . Logging . ConfigureExtensions ) . GetTypeInfo ( ) . Assembly ) ; //NLog.Extensions.Logging
82+
83+ LogManager . AddHiddenAssembly ( Assembly . Load ( new AssemblyName ( "Microsoft.Extensions.Logging" ) ) ) ;
84+ LogManager . AddHiddenAssembly ( Assembly . Load ( new AssemblyName ( "Microsoft.Extensions.Logging.Abstractions" ) ) ) ;
85+ LogManager . AddHiddenAssembly ( Assembly . Load ( new AssemblyName ( "NLog.Extensions.Logging" ) ) ) ;
8386
8487 try
8588 {
8689 //try the Filter ext
90+ InternalLogger . Trace ( "Try hide Microsoft.Extensions.Logging.Filter assembly for callsite" ) ;
8791 var filterAssembly = Assembly . Load ( new AssemblyName ( "Microsoft.Extensions.Logging.Filter" ) ) ;
8892 LogManager . AddHiddenAssembly ( filterAssembly ) ;
93+ InternalLogger . Trace ( "Hide Microsoft.Extensions.Logging.Filter assembly for callsite done" ) ;
8994
9095 }
9196 catch ( Exception ex )
9297 {
9398 InternalLogger . Trace ( ex , "filtering Microsoft.Extensions.Logging.Filter failed. Not an issue probably" ) ;
9499 }
95-
100+
101+ InternalLogger . Trace ( "Hide assemblies for callsite - done" ) ;
102+
96103 }
97104 catch ( Exception ex )
98105 {
You can’t perform that action at this time.
0 commit comments