yunus emre alpözen (JIRA | 27 Jan 16:52 2015
Picon

[jira] [Created] (LOG4NET-450) misleading error message

yunus emre alpözen created LOG4NET-450:
------------------------------------------

             Summary: misleading error message
                 Key: LOG4NET-450
                 URL: https://issues.apache.org/jira/browse/LOG4NET-450
             Project: Log4net
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2.13
         Environment: any
            Reporter: yunus emre alpözen
            Priority: Minor

If external configuration file is used (with "log4net.Config" appsettings), "Failed to find
configuration section 'log4net' in the application's .config file. Check your .config file for the
<log4net> and <configSections> elements. The configuration section should look like: <section
name=\"log4net\" type=\"log4net.Config.Log4NetConfigurationSectionHandler,log4net\" />"
error message is logged. It should be checked within
XmlConfigurator.InternalConfigure(ILoggerRepository repository) implementation for external
file. 

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

Ghanshyam (JIRA | 23 Jan 02:07 2015
Picon

[jira] [Comment Edited] (LOG4NET-344) Make AdoNetAppender not to stuck application process


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

Ghanshyam  edited comment on LOG4NET-344 at 1/23/15 1:07 AM:
-------------------------------------------------------------

Stefan, I know this is an old thread. But I could not find information if the above contribution made it to the
main branch. Is this merged into main branch? I am using latest log4net but am still seeing performance
problems with the ado net appender which I don't see with rolling file appender. Hence the question.

was (Author: ghanashyaml):
Stefan, I know this is an old thread. But I could not find information if the above contribution made it to the
main branch. Is this merged into main branch? I am using latest log4net but am still seeing performance
problems with the ado net appended which I don't see with rolling file appended. Hence the question.

> Make AdoNetAppender not to stuck application process
> ----------------------------------------------------
>
>                 Key: LOG4NET-344
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-344
>             Project: Log4net
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: Windows series
>            Reporter: Tom Tang
>              Labels: patch
>             Fix For: 3.5
(Continue reading)

Ghanshyam (JIRA | 23 Jan 02:06 2015
Picon

[jira] [Commented] (LOG4NET-344) Make AdoNetAppender not to stuck application process


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

Ghanshyam  commented on LOG4NET-344:
------------------------------------

Stefan, I know this is an old thread. But I could not find information if the above contribution made it to the
main branch. Is this merged into main branch? I am using latest log4net but am still seeing performance
problems with the ado net appended which I don't see with rolling file appended. Hence the question.

> Make AdoNetAppender not to stuck application process
> ----------------------------------------------------
>
>                 Key: LOG4NET-344
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-344
>             Project: Log4net
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: Windows series
>            Reporter: Tom Tang
>              Labels: patch
>             Fix For: 3.5
>
>         Attachments: AdoNetAppender.cs, AsyncForwardingAppender.cs
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
(Continue reading)

Rick Weyrauch (JIRA | 14 Jan 16:00 2015
Picon

[jira] [Commented] (LOG4NET-118) RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work


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

Rick Weyrauch commented on LOG4NET-118:
---------------------------------------

You might want to look at this a different way, the config itself has Append=true:

  <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
    <file value="..." />
    <appendToFile value="true" />
    ...

But the "rolling code" uses the inherent internal features of append=false "as a local feature" to make the
new root file after rolling. That is, on a new process we get appending to any existing root file, but on
rolling it pretends append is false in order to make the new file.

My intent here is to only change the behavior of making a new root after rolling, but I see that will
necessarily effect all append=false calls. I leave it to you to consider if one is a special case or both
should be addressed as a generic case.

> RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work
> ---------------------------------------------------------------------------------
>
>                 Key: LOG4NET-118
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-118
>             Project: Log4net
>          Issue Type: Bug
(Continue reading)

Dominik Psenner (JIRA | 14 Jan 15:52 2015
Picon

[jira] [Commented] (LOG4NET-118) RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work


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

Dominik Psenner commented on LOG4NET-118:
-----------------------------------------

Actually, by re-reading twice this comment:

// Internal check that the file is not being overwritten
// If not Appending to an existing file we should have rolled the file out of the
// way. Therefore we should not be over-writing an existing file.
// The only exception is if we are not allowed to roll the existing file away.

It seems obvious to me that append should be re-enabled in these cases to ensure that the file does not get
overwritten/truncated. But please test that patch anyway and feed back the results before I apply the patch.

> RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work
> ---------------------------------------------------------------------------------
>
>                 Key: LOG4NET-118
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-118
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: Windows 2003 / Microsoft .NET Framework 2.0
>            Reporter: Patrick Gautschi
>            Priority: Minor
(Continue reading)

Dominik Psenner (JIRA | 14 Jan 15:39 2015
Picon

[jira] [Commented] (LOG4NET-449) RollingFileAppender is not working correctly.


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

Dominik Psenner commented on LOG4NET-449:
-----------------------------------------

Btw, have you tested this with the latest log4net release?

> RollingFileAppender is not working correctly.
> ---------------------------------------------
>
>                 Key: LOG4NET-449
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-449
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.11
>         Environment: Circular logging is enabled through Log4net in Virtual directory Service Environment.
>            Reporter: Priyabrata Baral
>            Assignee: Dominik Psenner
>
> We have one circulat logging enabled through Log4net. However we can see  there is a discontinuity in
logging(i.e: inbetween some of the logs not found).
> Also we can see logs are getting generated, however not getting appended correctly. And we are getting
below error in Log4net file:
> log4net:ERROR RollingFileAppender: INTERNAL ERROR. Append is False but OutputFile [G:\Program
Files\Optimal IdM\_TraceLogging\VISServer.log] already exists.

(Continue reading)

Dominik Psenner (JIRA | 14 Jan 15:37 2015
Picon

[jira] [Updated] (LOG4NET-118) RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work


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

Dominik Psenner updated LOG4NET-118:
------------------------------------
    Attachment: LOG4NET-118.patch

Please check and test this patch and feed back the results.

> RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work
> ---------------------------------------------------------------------------------
>
>                 Key: LOG4NET-118
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-118
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: Windows 2003 / Microsoft .NET Framework 2.0
>            Reporter: Patrick Gautschi
>            Priority: Minor
>             Fix For: 1.2 Maintenance Release
>
>         Attachments: LOG4NET-118.patch
>
>
> When using the an appender configuration like
>     <appender name="InfoFile" type="log4net.Appender.RollingFileAppender">
>       <file value="info.log" />
(Continue reading)

Dominik Psenner (JIRA | 14 Jan 15:36 2015
Picon

[jira] [Commented] (LOG4NET-118) RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work


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

Dominik Psenner commented on LOG4NET-118:
-----------------------------------------

To me the rule of thumb to append when something goes wrong makes sense. At least existing data won't be
destroyed, but most likely appending will go on unnoticed. At least the patch looks easy and straight forward.

> RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work
> ---------------------------------------------------------------------------------
>
>                 Key: LOG4NET-118
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-118
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: Windows 2003 / Microsoft .NET Framework 2.0
>            Reporter: Patrick Gautschi
>            Priority: Minor
>             Fix For: 1.2 Maintenance Release
>
>
> When using the an appender configuration like
>     <appender name="InfoFile" type="log4net.Appender.RollingFileAppender">
>       <file value="info.log" />
>       <appendToFile value="false" />
(Continue reading)

Dominik Psenner (JIRA | 14 Jan 15:20 2015
Picon

[jira] [Reopened] (LOG4NET-449) RollingFileAppender is not working correctly.


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

Dominik Psenner reopened LOG4NET-449:
-------------------------------------

Noticed that the configuration is slightly different, thus my assumption that this could be a duplicate is
simply untrue. Apologies for the noise.

> RollingFileAppender is not working correctly.
> ---------------------------------------------
>
>                 Key: LOG4NET-449
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-449
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.11
>         Environment: Circular logging is enabled through Log4net in Virtual directory Service Environment.
>            Reporter: Priyabrata Baral
>            Assignee: Dominik Psenner
>
> We have one circulat logging enabled through Log4net. However we can see  there is a discontinuity in
logging(i.e: inbetween some of the logs not found).
> Also we can see logs are getting generated, however not getting appended correctly. And we are getting
below error in Log4net file:
> log4net:ERROR RollingFileAppender: INTERNAL ERROR. Append is False but OutputFile [G:\Program
Files\Optimal IdM\_TraceLogging\VISServer.log] already exists.

(Continue reading)

Rick Weyrauch (JIRA | 13 Jan 13:54 2015
Picon

[jira] [Commented] (LOG4NET-118) RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work


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

Rick Weyrauch commented on LOG4NET-118:
---------------------------------------

That is a fair question, but since I do not get any other messages regarding how or why the rename failed, it is
difficult to say. I did look for a path where the rename could fail silently but did not see any, so I am a bit
confused as to how it gets caused.

No matter that problem, it cannot do anything that results in missing logs right - that is the primary
concern here. So maybe it has to do something other than what is configured and either pick a different
name, or, possibly better, append to the existing file even though APPEND is false.

After some thought, I would vote to just append anyway even though that is not what was asked for. It will just
try and do it all over again naturally wont it? So, raise the error each time and just keep appending. If the
file gets too big and the logging application does not notice and react, it still ends badly, but at least
they had a chance to go address their problem. And really, chances are, if it was a temporary condition, the
file will rename correctly after a few attempts.

The one problem will be that all the other files have already had their names bumped, so you only have to do the
XXXXX top XXXXX.1 rename on the retries.

Hope that is clear enough for a conversation starter.

> RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work
> ---------------------------------------------------------------------------------
>
(Continue reading)

Dominik Psenner (JIRA | 13 Jan 08:22 2015
Picon

[jira] [Commented] (LOG4NET-118) RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work


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

Dominik Psenner commented on LOG4NET-118:
-----------------------------------------

How would you expect log4net to handle this? Best you write down a patch such that we can discuss it.

> RollingFileAppender: RollingStyle=Size with StaticLogFileName=false does not work
> ---------------------------------------------------------------------------------
>
>                 Key: LOG4NET-118
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-118
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: Windows 2003 / Microsoft .NET Framework 2.0
>            Reporter: Patrick Gautschi
>            Priority: Minor
>             Fix For: 1.2 Maintenance Release
>
>
> When using the an appender configuration like
>     <appender name="InfoFile" type="log4net.Appender.RollingFileAppender">
>       <file value="info.log" />
>       <appendToFile value="false" />
>       <encoding value="utf-8" />
(Continue reading)


Gmane