Michael Grondines (JIRA | 11 Sep 21:52 2014
Picon

[jira] [Closed] (LOG4NET-440) Hierarchy does not reset loggers on configuration changes


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

Michael Grondines closed LOG4NET-440.
-------------------------------------
    Resolution: Not a Problem

Need to put the update mode to "Overwrite" instead of the default "Merge"

<log4net update="Overwrite">

> Hierarchy does not reset loggers on configuration changes
> ---------------------------------------------------------
>
>                 Key: LOG4NET-440
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-440
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.13
>         Environment: .Net framework application(s)
>            Reporter: Michael Grondines
>            Priority: Minor
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Hi,
> We are using log4net in an application in .Net 3.5 where we cant to log things via hierarchically using the
assemblies. For instance we have : "Program.Sub.Utilities"
(Continue reading)

Michael Grondines (JIRA | 11 Sep 20:38 2014
Picon

[jira] [Created] (LOG4NET-440) Hierarchy does not reset loggers on configuration changes

Michael Grondines created LOG4NET-440:
-----------------------------------------

             Summary: Hierarchy does not reset loggers on configuration changes
                 Key: LOG4NET-440
                 URL: https://issues.apache.org/jira/browse/LOG4NET-440
             Project: Log4net
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2.13
         Environment: .Net framework application(s)
            Reporter: Michael Grondines
            Priority: Minor

Hi,
We are using log4net in an application in .Net 3.5 where we cant to log things via hierarchically using the
assemblies. For instance we have : "Program.Sub.Utilities"

Each classes contained within the application have a static member with the logger instance using :
  LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType)

For the configuration we are using the XmlConfigurator. Now, if we add a Logger for "Program.Sub" with
level DEBUG, save, and then change the name of the logger for "Program.Sub.Utilities", we are still
getting logs from stuff in "Program.Sub" !

Looks like the first instance of the logger stays enabled, even if it's gone in the config.

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

Dominik Psenner (JIRA | 2 Sep 15:59 2014
Picon

[jira] [Resolved] (LOG4NET-439) Log file overwritten by rollingLogFileAppender after date-change with rolling style = date


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

Dominik Psenner resolved LOG4NET-439.
-------------------------------------
    Resolution: Duplicate

Keeping a maximum number of backups when rolling over date/time boundaries is currently not supported.

> Log file overwritten by rollingLogFileAppender after date-change with rolling style = date
> ------------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-439
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-439
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.13
>         Environment: Windows XP, Windows server 2008, .Net 4.0
>            Reporter: Gerard de Leeuw
>            Priority: Minor
>
> When logging from the main thread after a date change and the maxsize of backups is reached, the existing
log lines of other threads is removed from the file (or file is overwritten). Logging from other (sub)
threads don't affect the file contents.
> Relevant appender configuration:
> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
> <appendToFile value="true" />
> <staticLogFileName value="false" />
(Continue reading)

Dominik Psenner (JIRA | 2 Sep 15:59 2014
Picon

[jira] [Closed] (LOG4NET-439) Log file overwritten by rollingLogFileAppender after date-change with rolling style = date


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

Dominik Psenner closed LOG4NET-439.
-----------------------------------
    Assignee: Dominik Psenner

> Log file overwritten by rollingLogFileAppender after date-change with rolling style = date
> ------------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-439
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-439
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.13
>         Environment: Windows XP, Windows server 2008, .Net 4.0
>            Reporter: Gerard de Leeuw
>            Assignee: Dominik Psenner
>            Priority: Minor
>
> When logging from the main thread after a date change and the maxsize of backups is reached, the existing
log lines of other threads is removed from the file (or file is overwritten). Logging from other (sub)
threads don't affect the file contents.
> Relevant appender configuration:
> <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
> <appendToFile value="true" />
> <staticLogFileName value="false" />
> <rollingStyle value="Date" />
(Continue reading)

Gerard de Leeuw (JIRA | 2 Sep 14:37 2014
Picon

[jira] [Created] (LOG4NET-439) Log file overwritten by rollingLogFileAppender after date-change with rolling style = date

Gerard de Leeuw created LOG4NET-439:
---------------------------------------

             Summary: Log file overwritten by rollingLogFileAppender after date-change with rolling style = date
                 Key: LOG4NET-439
                 URL: https://issues.apache.org/jira/browse/LOG4NET-439
             Project: Log4net
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 1.2.13
         Environment: Windows XP, Windows server 2008, .Net 4.0
            Reporter: Gerard de Leeuw
            Priority: Minor

When logging from the main thread after a date change and the maxsize of backups is reached, the existing log
lines of other threads is removed from the file (or file is overwritten). Logging from other (sub) threads
don't affect the file contents.

Relevant appender configuration:
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<appendToFile value="true" />
<staticLogFileName value="false" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd'.log'" />
<maxSizeRollBackups value="2" />

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

(Continue reading)

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)


Gmane