You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Oba Win (Jira)" <ji...@apache.org> on 2020/09/15 16:15:00 UTC

[jira] [Commented] (LOG4NET-649) MemoryAppender doesn't work on Alpine Linux with 2.0.10

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

Oba Win commented on LOG4NET-649:
---------------------------------

We also encountered the same problem in our unit tests after upgrading to 2.0.10 (2.0.9 and 2.0.8 were previously working).  Unit test passes in windows, but fails in alpine linux because.

 

Additional info:

  - creating a log entry with the "simple" calls results in no event being created:

       *_logger.Info("Hello");_*

 

however, creating a log entry with the lower-level calls does successfully result in an event being created:

*_LoggingEventData data = new LoggingEventData()_*
 *_{_*
    *_TimeStampUtc = DateTime.UtcNow,_*
    *_LoggerName = "Logger",_*
    *_ThreadName = Thread.CurrentThread.ManagedThreadId.ToString(),_*
    *_Level = Level.Info,_*
    *_Message = "Hello",_*
    *_Properties = new PropertiesDictionary()_*
 *_};_*

*_logger.Logger.Log(new LoggingEvent(data));_*

> MemoryAppender doesn't work on Alpine Linux with 2.0.10
> -------------------------------------------------------
>
>                 Key: LOG4NET-649
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-649
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0.10
>         Environment: alpine linux 3.1.8-alpine3.12, dotnet core 3.1.  
>            Reporter: Robert May
>            Priority: Blocker
>
> We have unit tests that are testing to ensure that certain log errors and warnings are output.  We do this by setting up a memory appender in our test initialize.
> After upgrading to 2.0.10, memory appender never has any events.  We tried both PopAllEvents and GetEvents and neither return any events.
> Everything works fine on Windows, but doesn't work on Linux or Mac.
> Initialization code:
>  {{var repo = LogManager.GetRepository(typeof(xxxx).Assembly);}}
>  {{this.LogAppender = new MemoryAppender();}}
>  {{BasicConfigurator.Configure(repo, this.LogAppender);}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)