You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2020/04/04 22:30:06 UTC
[jira] [Updated] (LOG4NET-537) Crash on log during AssemblyLoad
event
[ https://issues.apache.org/jira/browse/LOG4NET-537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralph Goers updated LOG4NET-537:
--------------------------------
LOG4NET is now dormant.
> Crash on log during AssemblyLoad event
> --------------------------------------
>
> Key: LOG4NET-537
> URL: https://issues.apache.org/jira/browse/LOG4NET-537
> Project: Log4net
> Issue Type: Bug
> Affects Versions: 1.2.15
> Environment: Visual Studio 2013,C#, Dot.Net 4.61
> nuget : <package id="log4net" version="2.0.5" targetFramework="net461" />
> Reporter: Guillaume Favre
> Priority: Major
>
> Hello,
> the following code cause the program to crash.
> class Program
> {
> private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
> static void Main(string[] args)
> {
> try
> {
> AppDomain.CurrentDomain.AssemblyLoad += CurrentDomainAssemblyLoad;
> log4net.Config.BasicConfigurator.Configure();
> Exception e = new Exception("Toto");
> throw e;
> }
> catch (Exception e)
> {
> Log.Error("Error ", e);
> }
> }
> private static void CurrentDomainAssemblyLoad(object sender, AssemblyLoadEventArgs args)
> {
> Log.Debug("COUCOU");
> }
> }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)