Jeff Armbruster (JIRA | 21 Aug 23:16 2014
Picon

[jira] [Created] (LOG4NET-438) SmtpAppender not working

Jeff Armbruster created LOG4NET-438:
---------------------------------------

             Summary: SmtpAppender not working
                 Key: LOG4NET-438
                 URL: https://issues.apache.org/jira/browse/LOG4NET-438
             Project: Log4net
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 1.2.13
         Environment: Windows 7, Visual Studio 2013, ASP.Net 4.5.2
            Reporter: Jeff Armbruster
            Priority: Blocker

SendBuffer and SendEmail are never called.

I've tried many different configurations.

Here's my setup.

My config:

    <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
      <to value=""******** />
      <from value="jeff <at> apexenergetics.com" />
      <subject value="test logging message" />
      <smtpHost value="smtp.gmail.com" />
      <password value="*************** " />
      <userName value="******" />
      <authentication value="Basic" />
(Continue reading)

Mike Barry (JIRA | 20 Aug 15:44 2014
Picon

[jira] [Updated] (LOG4NET-437) LogicalThreadContext data does not flow properly using Async and Await


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

Mike Barry updated LOG4NET-437:
-------------------------------

    Description: 
LogicalThreadContext doesn't work properly when using Async and Await. The current NDC call stack gets
corrupted because the logical data context is not immutable. (See:
http://blog.stephencleary.com/2013/04/implicit-async-context-asynclocal.html for the gory
details). I've attached a Program.cs that demonstrates the issue. You will see with an unpatched log4net
the thread context is corrupted compared to the proper implementation in MyStack and the console logger.
An entry like:

LOG4NET Main 1 A 2 A: </MoreWork>
LOG4NET Main 1 A 2 A: </MoreWork>

is invalid and should not be possible in a properly working thread context.

I've attached a VERY naive patch that corrects the issue.

  was:
LogicalThreadContext doesn't work properly when using Async and Await. The current NDC call stack gets
corrupted because the logical data context is not immutable. (See:
http://blog.stephencleary.com/2013/04/implicit-async-context-asynclocal.html for the gory
details). I've attached a Program.cs that demonstrates the issue. You will see with an unpatched log4net
the thread context is corrupted compared to the proper implementation in MyStack and the console logger.
An entry like:

(Continue reading)

Mike Barry (JIRA | 20 Aug 15:42 2014
Picon

[jira] [Updated] (LOG4NET-437) LogicalThreadContext data does not flow properly using Async and Await


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

Mike Barry updated LOG4NET-437:
-------------------------------

    Attachment: LogicalThreadContext.diff

Part 2 of a naive patch to solve the issue.

> LogicalThreadContext data does not flow properly using Async and Await
> ----------------------------------------------------------------------
>
>                 Key: LOG4NET-437
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-437
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.9, 1.2.10, 1.2.11, 1.2.12, 1.2.13
>         Environment: Windows 7, .NET 4.5
>            Reporter: Mike Barry
>         Attachments: LogicalThreadContext.diff, Program.cs, ThreadContextStacks.diff
>
>
> LogicalThreadContext doesn't work properly when using Async and Await. The current NDC call stack gets
corrupted because the logical data context is not immutable. (See:
http://blog.stephencleary.com/2013/04/implicit-async-context-asynclocal.html for the gory
details). I've attached a Program.cs that demonstrates the issue. You will see with an unpatched log4net
the thread context is corrupted compared to the proper implementation in MyStack and the console logger.
(Continue reading)

Mike Barry (JIRA | 20 Aug 15:42 2014
Picon

[jira] [Updated] (LOG4NET-437) LogicalThreadContext data does not flow properly using Async and Await


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

Mike Barry updated LOG4NET-437:
-------------------------------

    Attachment: ThreadContextStacks.diff

Part 1 of a naive patch to solve the issue.

> LogicalThreadContext data does not flow properly using Async and Await
> ----------------------------------------------------------------------
>
>                 Key: LOG4NET-437
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-437
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.9, 1.2.10, 1.2.11, 1.2.12, 1.2.13
>         Environment: Windows 7, .NET 4.5
>            Reporter: Mike Barry
>         Attachments: LogicalThreadContext.diff, Program.cs, ThreadContextStacks.diff
>
>
> LogicalThreadContext doesn't work properly when using Async and Await. The current NDC call stack gets
corrupted because the logical data context is not immutable. (See:
http://blog.stephencleary.com/2013/04/implicit-async-context-asynclocal.html for the gory
details). I've attached a Program.cs that demonstrates the issue. You will see with an unpatched log4net
the thread context is corrupted compared to the proper implementation in MyStack and the console logger.
(Continue reading)

Mike Barry (JIRA | 20 Aug 15:42 2014
Picon

[jira] [Updated] (LOG4NET-437) LogicalThreadContext data does not flow properly using Async and Await


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

Mike Barry updated LOG4NET-437:
-------------------------------

    Attachment: Program.cs

Demos the issue

> LogicalThreadContext data does not flow properly using Async and Await
> ----------------------------------------------------------------------
>
>                 Key: LOG4NET-437
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-437
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.9, 1.2.10, 1.2.11, 1.2.12, 1.2.13
>         Environment: Windows 7, .NET 4.5
>            Reporter: Mike Barry
>         Attachments: LogicalThreadContext.diff, Program.cs, ThreadContextStacks.diff
>
>
> LogicalThreadContext doesn't work properly when using Async and Await. The current NDC call stack gets
corrupted because the logical data context is not immutable. (See:
http://blog.stephencleary.com/2013/04/implicit-async-context-asynclocal.html for the gory
details). I've attached a Program.cs that demonstrates the issue. You will see with an unpatched log4net
the thread context is corrupted compared to the proper implementation in MyStack and the console logger.
(Continue reading)

Mike Barry (JIRA | 20 Aug 15:40 2014
Picon

[jira] [Created] (LOG4NET-437) LogicalThreadContext data does not flow properly using Async and Await

Mike Barry created LOG4NET-437:
----------------------------------

             Summary: LogicalThreadContext data does not flow properly using Async and Await
                 Key: LOG4NET-437
                 URL: https://issues.apache.org/jira/browse/LOG4NET-437
             Project: Log4net
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2.13, 1.2.12, 1.2.11, 1.2.10, 1.2.9
         Environment: Windows 7, .NET 4.5
            Reporter: Mike Barry

LogicalThreadContext doesn't work properly when using Async and Await. The current NDC call stack gets
corrupted because the logical data context is not immutable. (See:
http://blog.stephencleary.com/2013/04/implicit-async-context-asynclocal.html for the gory
details). I've attached a Program.cs that demonstrates the issue. You will see with an unpatched log4net
the thread context is corrupted compared to the proper implementation in MyStack and the console logger.
An entry like:

LOG4NET Main 1 A 2 A: </MoreWork>
LOG4NET Main 1 A 2 A: </MoreWork>

is invalid and should not be possible in a properly working thread context.

--
This message was sent by Atlassian JIRA
(v6.2#6252)

(Continue reading)

Krzysztof L. (JIRA | 20 Aug 13:15 2014
Picon

[jira] [Commented] (LOG4NET-378) Rolling log file is overwritten when application is restarted


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

Krzysztof L. commented on LOG4NET-378:
--------------------------------------

I have found another issue when using second appender configuration from my previous note (https://issues.apache.org/jira/browse/LOG4NET-378?focusedCommentId=14103641&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14103641)...

Problem from this ticket still occurs when using configuration like that:

{code:xml}
<appender name="mainAppender" type="log4net.Appender.RollingFileAppender">
  <file value="logs\Module_XYZ_" />

  <staticLogFileName value="false" />

  <appendToFile value="true" />

  <encoding>utf-8</encoding>

  <preserveLogFileNameExtension value="true"/>

  <rollingStyle value="Composite" />

  <datePattern value="''yyyy-MM-dd'.log'"/>

  <maxSizeRollBackups value="10" />

(Continue reading)

Krzysztof L. (JIRA | 20 Aug 10:54 2014
Picon

[jira] [Commented] (LOG4NET-378) Rolling log file is overwritten when application is restarted


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

Krzysztof L. commented on LOG4NET-378:
--------------------------------------

Hello

Patch provided in commit (http://svn.apache.org/repos/asf/logging/log4net/trunk):
{quote}
Revision: 1486596
Author: dpsenner
Date: 27.05.2013 14:45:46
Message:
LOG4NET-378 fixed a problem where rolled log files get overwritten when the application is restarted

The cause is that InitializeFromOneFile() does not succesfully detect the filenames.
----
Modified : /logging/log4net/trunk/src/Appender/RollingFileAppender.cs
{quote}

works OK for configuration provided  in "Description" of this ticket. But it does NOT WORK in scenario when
datePattern has additional *uppercase* characters, eg:

bq. <datePattern value="'Module_XYZ_'yyyy-MM-dd'.log'"/>

I know that additional strings could be inserted to <file value=".../> but it would be nice if such
datePattern configuration is also supported, especially that the required code patch is not too
(Continue reading)

Robert Sevcik (JIRA | 4 Aug 20:16 2014
Picon

[jira] [Commented] (LOG4NET-419) Adding Json layout to support simple integration with nxlog and similar destinations


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

Robert Sevcik commented on LOG4NET-419:
---------------------------------------

Hi, I have stabilized the features and introduced tests. Please let me know what is required next to
integrate to log4net trunk. I'm happy to support the inclusion. Thanks, Rob

> Adding Json layout to support simple integration with nxlog and similar destinations
> ------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-419
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-419
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 1.2.13, 1.3.0
>            Reporter: Robert Sevcik
>              Labels: patch
>             Fix For: 1.3.0
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Hi,
> I've created an extension which will effectively enable Json logging from log4net. It is implemented as a
Layout so it can be used with pretty much any appender, especially the UDP appender :o). The aim is to enable
(Continue reading)

Dominik Psenner (JIRA | 20 Jul 22:10 2014
Picon

[jira] [Comment Edited] (LOG4NET-436) OutOfMemoryException


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

Dominik Psenner edited comment on LOG4NET-436 at 7/20/14 8:09 PM:
------------------------------------------------------------------

There is one way to find out if it is fixed in the latest release: try it out. I was unable to reproduce the issue
a year ago, but maybe we can do so this time. We require either a sample application to memory profile the
root cause or a memory profiler evaluation from your side.

was (Author: nachbarslumpi):
There is one way to find out if it is fixed in the latest release: try it out. I was unable to reproduce the issue
a year ago, but maybe we can do so this time. We require either a sample application to reproduce the issue an
memory profile the root cause or a memory profiler evaluation from your side.

> OutOfMemoryException
> --------------------
>
>                 Key: LOG4NET-436
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-436
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.10
>         Environment: OS: Windows 7 Professional; .NET 4.0
>            Reporter: Cristian Gavrilut
>            Priority: Blocker
>              Labels: OutOfMemoryError, outofmemory
(Continue reading)

Dominik Psenner (JIRA | 20 Jul 22:08 2014
Picon

[jira] [Commented] (LOG4NET-436) OutOfMemoryException


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

Dominik Psenner commented on LOG4NET-436:
-----------------------------------------

There is one way to find out if it is fixed in the latest release: try it out. I was unable to reproduce the issue
a year ago, but maybe we can do so this time. We require either a sample application to reproduce the issue an
memory profile the root cause or a memory profiler evaluation from your side.

> OutOfMemoryException
> --------------------
>
>                 Key: LOG4NET-436
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-436
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.10
>         Environment: OS: Windows 7 Professional; .NET 4.0
>            Reporter: Cristian Gavrilut
>            Priority: Blocker
>              Labels: OutOfMemoryError, outofmemory
>
> I've noticed as on the same version a bug was opened which was closed with reason cannot reproduce:
> https://issues.apache.org/jira/browse/LOG4NET-294 
> Now we could reproduce constantly with our application but just on a single machine. I've collected a
minidump with full memory as the application was sky rocketing on memory to 1.6 GB and then was throwing an
(Continue reading)


Gmane