[jira] [Commented] (LOG4NET-537) Crash on log during AssemblyLoad event

2016-11-30 Thread Guillaume Favre (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4NET-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15708786#comment-15708786
 ] 

Guillaume Favre commented on LOG4NET-537:
-

I try a call to Exception.ToString() before the first "throw" and it works fine.
Thank you for your answer

> 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  : 
>Reporter: Guillaume Favre
>
> 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
(v6.3.4#6332)


[jira] [Commented] (LOG4NET-537) Crash on log during AssemblyLoad event

2016-11-30 Thread Dominik Psenner (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4NET-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15708599#comment-15708599
 ] 

Dominik Psenner commented on LOG4NET-537:
-

Looks like System.Exception.ToString() crashes. The clr is not fully 
initialized when you try to log. If thats the case you should be able to 
reproduce the issue with a plain invocation to the method above.

I am afraid there is nothing we can do for you.

> 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  : 
>Reporter: Guillaume Favre
>
> 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
(v6.3.4#6332)


[jira] [Closed] (LOG4NET-534) rollingfileappender: INTERNAL ERROR. Append is False but OutputFile already exists

2016-11-30 Thread Dominik Psenner (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4NET-534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dominik Psenner closed LOG4NET-534.
---
Resolution: Invalid
  Assignee: Dominik Psenner

Closing as invalid. The logging framework cant work around permission issues. 
Feel free to reopen the issue if there is something in the logging framework 
that could be improved. That can be code changes, documentation, faq additions 
or others.

With respect to your issue, I am unable to help you. You could raise this 
question on the mailing lists to reach out to a larger audience, hoping that 
there is somebody who can help you.

> rollingfileappender: INTERNAL ERROR. Append is False but OutputFile already 
> exists
> --
>
> Key: LOG4NET-534
> URL: https://issues.apache.org/jira/browse/LOG4NET-534
> Project: Log4net
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 1.2.15
> Environment: Windows 10
>Reporter: Jay McCormick
>Assignee: Dominik Psenner
>  Labels: newbie
>
> Have read about [LOG4NET-118] and [LOG4NET-485] but it looks like neither has 
> a resolution.  Existing log file is not being rolled, it is being overwritten 
> instead.
> Same code and config running on Windows 7, produces the error message in the 
> summary.  Not sure if UAC is a cause.  Log file is written into users 
> %LOCALAPPDATA%\TEMP directory.  I have read about some "internal" log4net 
> logging, but do not know how to activate that.
> The config:
> 
> 
> 
> 
>  type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
> 
> 
> 
>  type="log4net.Appender.RollingFileAppender">
>  value="%property{LogFileName}"/>
> 
> 
> 
> 
> 
>  value="%date{ISO8601}%property{messageId}%-5level%message%newline"/>
> 
> 
> 
> 
> 
> 
>  type="AsyncForwardingAppenderHotSwap">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The AsyncBufferingAppender-HotSwap is borrowed from here:
> *   Copied from .NET low latency logging. Part 5 - Asynchronous log4net 
> solutions
> *   
> http://deep-depth.blogspot.com/2014/02/net-low-latency-logging-part-5.html
> (I also tried without the Asynchronous Appender as well)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LOG4NET-537) Crash on log during AssemblyLoad event

2016-11-30 Thread Guillaume Favre (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4NET-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15708554#comment-15708554
 ] 

Guillaume Favre commented on LOG4NET-537:
-

Thank you for your answer.
Here is the stack trace.



mscorlib.dll!System.Diagnostics.Assert.Fail(string conditionString, 
string message, string windowTitle, int exitCode, 
System.Diagnostics.StackTrace.TraceFormat stackTraceFormat, int 
numStackFramesToSkip) Unknown

mscorlib.dll!System.Environment.ResourceHelper.GetResourceStringCode(object 
userDataIn) Unknown
[Native to Managed Transition]  
mscorlib.dll!System.Environment.ResourceHelper.GetResourceString(string 
key, System.Globalization.CultureInfo culture)  Unknown
mscorlib.dll!System.Environment.ResourceHelper.GetResourceString(string 
key)Unknown
mscorlib.dll!System.Environment.GetResourceStringLocal(string key)  
Unknown
[Native to Managed Transition]  

mscorlib.dll!System.Diagnostics.StackTrace.ToString(System.Diagnostics.StackTrace.TraceFormat
 traceFormat)  Unknown
mscorlib.dll!System.Environment.GetStackTrace(System.Exception e, bool 
needFileInfo)Unknown
mscorlib.dll!System.Exception.GetStackTrace(bool needFileInfo)  Unknown
mscorlib.dll!System.Exception.ToString(bool needFileLineInfo, bool 
needMessage) Unknown
mscorlib.dll!System.Exception.ToString()Unknown
log4net.dll!log4net.Util.LogLog.Error(System.Type source, string 
message, System.Exception exception)   Unknown
log4net.dll!log4net.Repository.Hierarchy.Logger.Log(System.Type 
callerStackBoundaryDeclaringType, log4net.Core.Level level, object message, 
System.Exception exception) Unknown
log4net.dll!log4net.Core.LogImpl.Debug(object message)  Unknown
BugLog4Net.exe!BugLog4Net.Program.CurrentDomainAssemblyLoad(object 
sender, System.AssemblyLoadEventArgs args) Line 35   C#

mscorlib.dll!System.AppDomain.OnAssemblyLoadEvent(System.Reflection.RuntimeAssembly
 LoadedAssembly) Unknown
[Native to Managed Transition]  

mscorlib.dll!System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(string
 name, System.Globalization.CultureInfo culture, System.Version version, bool 
throwOnFileNotFound, ref System.Threading.StackCrawlMark stackMark) Unknown

mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(System.Globalization.CultureInfo
 lookForCulture, ref System.Threading.StackCrawlMark stackMark)Unknown

mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo
 culture, 
System.Collections.Generic.Dictionary 
localResourceSets, bool tryParents, bool createIfNotExists, ref 
System.Threading.StackCrawlMark stackMark)Unknown

mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo
 requestedCulture, bool createIfNotExists, bool tryParents, ref 
System.Threading.StackCrawlMark stackMark) Unknown

mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo
 culture, bool createIfNotExists, bool tryParents) Unknown
mscorlib.dll!System.Resources.ResourceManager.GetString(string name, 
System.Globalization.CultureInfo culture)  Unknown
System.Core.dll!System.SR.GetString(string name)Unknown

System.Core.dll!System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(System.Threading.ReaderWriterLockSlim.TimeoutTracker
 timeout)Unknown

System.Core.dll!System.Threading.ReaderWriterLockSlim.TryEnterReadLock(System.Threading.ReaderWriterLockSlim.TimeoutTracker
 timeout)Unknown
log4net.dll!log4net.Util.ReaderWriterLock.AcquireReaderLock()   Unknown

log4net.dll!log4net.Repository.Hierarchy.Logger.CallAppenders(log4net.Core.LoggingEvent
 loggingEvent)   Unknown
log4net.dll!log4net.Repository.Hierarchy.Logger.ForcedLog(System.Type 
callerStackBoundaryDeclaringType, log4net.Core.Level level, object message, 
System.Exception exception)   Unknown
log4net.dll!log4net.Repository.Hierarchy.Logger.Log(System.Type 
callerStackBoundaryDeclaringType, log4net.Core.Level level, object message, 
System.Exception exception) Unknown
log4net.dll!log4net.Core.LogImpl.Debug(object message)  Unknown
BugLog4Net.exe!BugLog4Net.Program.CurrentDomainAssemblyLoad(object 
sender, System.AssemblyLoadEventArgs args) Line 35   C#

mscorlib.dll!System.AppDomain.OnAssemblyLoadEvent(System.Reflection.RuntimeAssembly
 LoadedAssembly) Unknown
[Native to Managed Transition]  

mscorlib.dll!System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(string
 name, System.Globalization.CultureInfo culture, System.Version 

[jira] [Created] (LOG4NET-537) Crash on log during AssemblyLoad event

2016-11-30 Thread Guillaume Favre (JIRA)
Guillaume Favre created LOG4NET-537:
---

 Summary: 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  : 
Reporter: Guillaume Favre


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
(v6.3.4#6332)