@@ -58,6 +58,8 @@ public static void ProcessAssemblies(
5858
5959 foreach ( ExportedAssembly assembly in assemblies )
6060 {
61+ Logger . Initialization . Verbose ( "Processing assembly {0}. ExplicitExports {1}, ExplicitRegistration {2}, ComServer {3}, IsDynamic {4}" ,
62+ assembly . Assembly . FullName , assembly . ExplicitExports , assembly . ExplicitRegistration , assembly . ComServer , assembly . IsDynamic ) ;
6163 // Patch contributed by y_i on CodePlex:
6264 // http://stackoverflow.com/questions/11915389/assembly-gettypes-throwing-an-exception
6365 Type [ ] types ;
@@ -80,6 +82,8 @@ public static void ProcessAssemblies(
8082 foreach ( Type type in types )
8183 {
8284 if ( type == null ) continue ; // We might get nulls from ReflectionTypeLoadException above
85+
86+ Logger . Initialization . Verbose ( "Processing type {0}" , type . FullName ) ;
8387 try
8488 {
8589 object [ ] attribs = type . GetCustomAttributes ( false ) ;
@@ -96,12 +100,11 @@ public static void ProcessAssemblies(
96100 }
97101 catch ( Exception e )
98102 {
99- // TODO: This is unexpected - raise to LogDisplay?
100- Debug . Print ( "Type {0} could not be analysed. Error: {1}" , type . FullName , e . ToString ( ) ) ;
103+ Logger . Initialization . Warn ( "Type {0} could not be processed. Error: {1}" , type . FullName , e . ToString ( ) ) ;
101104 }
102105 }
103106 }
104- // Sigh. Excel server (service?) stuff is till ugly - but no reeal reason to remove it yet.
107+ // Sigh. Excel server (service?) stuff is still ugly - but no real reason to remove it yet.
105108 AssemblyLoaderExcelServer . GetExcelServerMethods ( excelServerInfos , methods ) ;
106109 }
107110
@@ -117,7 +120,7 @@ static void GetExcelMethods(Type t, bool explicitExports, List<MethodInfo> excel
117120 t . Namespace == "My" )
118121 {
119122 // Ignored cases
120- Logger . Registration . Info ( "Type ignored: {0}" , t . FullName ) ;
123+ Logger . Initialization . Info ( "Type ignored: {0}" , t . FullName ) ;
121124 return ;
122125 }
123126
@@ -161,12 +164,12 @@ static bool IsMethodSupported(MethodInfo mi, bool explicitExports)
161164 // We want to log methods that are marked for export, but have unsupported types.
162165 if ( ! isSupported && IsMethodMarkedForExport ( mi ) )
163166 {
164- Logger . Registration . Error ( "Method not registered - unsupported types : '{0}.{1}'" , mi . DeclaringType . Name , mi . Name ) ;
167+ Logger . Initialization . Error ( "Method not registered - unsupported signature, abstract or generic : '{0}.{1}'" , mi . DeclaringType . Name , mi . Name ) ;
165168 }
166169 else if ( ! isSupported )
167170 {
168171 // CONSIDER: More detailed logging
169- Logger . Registration . Info ( "Method not registered - unsupported types : '{0}.{1}'" , mi . DeclaringType . Name , mi . Name ) ;
172+ Logger . Initialization . Info ( "Method not registered - unsupported signature, abstract or generic : '{0}.{1}'" , mi . DeclaringType . Name , mi . Name ) ;
170173 }
171174
172175 return isSupported ;
@@ -246,11 +249,12 @@ static public void GetExcelAddIns(ExportedAssembly assembly, Type t, bool loadRi
246249 info . Instance = Activator . CreateInstance ( t ) ;
247250 info . ParentDnaLibrary = assembly . ParentDnaLibrary ;
248251 addIns . Add ( info ) ;
252+ Logger . Registration . Verbose ( "GetExcelAddIns - Created add-in object of type: {0}" , t . FullName ) ;
249253 }
250254 }
251255 catch ( Exception e ) // I think only CreateInstance can throw an exception here...
252256 {
253- Debug . Print ( "GetExcelAddIns CreateInstance problem for type: {0} - exception: {1}" , t . FullName , e ) ;
257+ Logger . Initialization . Warn ( "GetExcelAddIns CreateInstance problem for type: {0} - exception: {1}" , t . FullName , e ) ;
254258 }
255259
256260 }
@@ -277,6 +281,7 @@ static public void GetRtdServerTypes(Type t, List<Type> rtdServerTypes, out bool
277281 //rtdServerTypes[t.FullName] = t;
278282 rtdServerTypes . Add ( t ) ;
279283 isRtdServer = true ;
284+ Logger . Initialization . Verbose ( "GetRtdServerTypes - Found RTD server type: {0}" , t . FullName ) ;
280285 }
281286 }
282287 }
@@ -333,6 +338,7 @@ static public void GetComClassTypes(ExportedAssembly assembly, Type type, object
333338 TypeLibPath = assembly . TypeLibPath
334339 } ;
335340 comClassTypes . Add ( comClassType ) ;
341+ Logger . Initialization . Verbose ( "GetComClassTypes - Found type {0}, with ProgId {1}" , type . FullName , progId ) ;
336342 }
337343 }
338344
0 commit comments