-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime errors (using JSNLog) #47
Comments
I think the first error en version 1.0.0.6 it's because I had a mess deciding the name Anyway I'll look into the 3.0.0.2, I'll try to reproduce the other 2 exceptions creating a MVC project during the Night (GMT+1) and let you know about, I think the problem was to not fully test the new version that it's |
Hi I couldn't reproduce the exception, I downloaded the JSNLog Demos and added the JSNLogDemo_Log4Net to the examples solution in the repository.... I add a gif "showing" the dependencies, the |
Hi, I don't have an example code to send you atm unfortunately. I'll be gone on a trip for two weeks. I'll see if I can cook something up when I get back to reproduce the error. Cheers, |
Hi,
I'm having some problems with Gelf4Net. I'm using it with JSNLog in a MVC project targeting 4.5. I have also created a class that extends the GelfUdpAppender to reformat JSNLog messages.
In Gelf4Net.UdpAppender (1.0.0.6) it gives me the following error at runtime with the log4net debugging:
log4net:ERROR Could not create Appender [GelfUdpAppender] of type [Gelf4net.Appender.GelfUdpAppender, Gelf4net]. Reported error follows. System.IO.FileNotFoundException: Could not load file or assembly 'Gelf4net' or one of its dependencies. The system cannot find the file specified. File name: 'Gelf4net' at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) 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.ParseAppender(XmlElement appenderElement)
In Gelf4Net (3.0.0.2) package it gives me:
log4net:ERROR Could not create Appender [GelfUdpAppender] of type [Gelf4net.Appender.GelfUdpAppender, Gelf4net]. Reported error follows. System.InvalidOperationException: An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%@ Page Async="true" %>. This exception may also indicate an attempt to call an "async void" method, which is generally unsupported within ASP.NET request processing. Instead, the asynchronous method should return a Task, and the caller should await it. at System.Web.AspNetSynchronizationContext.OperationStarted() at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Create() at Gelf4Net.Appender.GelfUdpAppender.ActivateOptions() at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)
In Gelf4Net (3.0.0.1) it worked with the normal appender but when I used my own that extended yours it also gave me an error, similar to the first:
log4net:ERROR Could not create Appender [JsnGelfUdpAppender] of type [f.log4net.JsnGelfUdpAppender.JsnGelfUdpAppender, JsnGelfUdpAppender]. Reported error follows. System.TypeLoadException: Could not load type 'Gelf4Net.Appender.GelfUdpAppender' from assembly 'Gelf4Net, Version=3.0.0.1, Culture=neutral, PublicKeyToken=null'. at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) 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.ParseAppender(XmlElement appenderElement)
In Gelf4net/Gelf4NetAppender v 1.2.11.8 it works both on its own and with my extended class.
Kind regards,
Peter
The text was updated successfully, but these errors were encountered: