Trapping log4net errors in .net

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Trapping log4net errors in .net

Harold
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I'm trying to use

      <errorHandler type="UnifyCommon.Logging.CustomErrorHandler">
      </errorHandler>

for the appender element in app.config.

When
  log4net.Config.XmlConfigurator.Configure();
is executed I get the following error.

Am I missing a configuration step?


log4net:ERROR Failed to find type [UnifyCommon.Logging.CustomErrorHandler]
System.TypeLoadException: Could not load type [UnifyCommon.Logging.CustomErrorHandler]. Tried assembly [log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a] and all loaded assemblies
   at log4net.Util.SystemInfo.GetTypeFromString(Assembly relativeAssembly, String typeName, Boolean throwOnError, Boolean ignoreCase)
   at log4net.Util.SystemInfo.GetTypeFromString(String typeName, Boolean throwOnError, Boolean ignoreCase)
   at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.CreateObjectFromXml(XmlElement element, Type defaultTargetType, Type typeConstraint)
log4net:ERROR Failed to create object to set param: errorHandler
log4net:ERROR Failed to find type [UnifyCommon.Logging.CustomErrorHandler]
System.TypeLoadException: Could not load type [UnifyCommon.Logging.CustomErrorHandler]. Tried assembly [log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a] and all loaded assemblies
   at log4net.Util.SystemInfo.GetTypeFromString(Assembly relativeAssembly, String typeName, Boolean throwOnError, Boolean ignoreCase)
   at log4net.Util.SystemInfo.GetTypeFromString(String typeName, Boolean throwOnError, Boolean ignoreCase)
   at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.CreateObjectFromXml(XmlElement element, Type defaultTargetType, Type typeConstraint)
log4net:ERROR Failed to create object to set param: errorHandler



Loading...