Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug to logging by day of week [Исправлена ошибка с логированием… #2093

Conversation

RussianDragon
Copy link

Fixed bug to logging by day of week.

Exemple config

<target name="testName" xsi:type="File" fileName="C:/log/${logger}.log"
			layout="${message}"
      archiveFileName="C:/log/${logger}_{##}.log" archiveNumbering="Date" archiveEvery="Monday" maxArchiveFiles="10" archiveDateFormat="yyyy-MM-dd-HH-mm"
			concurrentWrites="true" keepFileOpen="false" encoding="UTF-8"/>
<logger name="testLogger" writeTo="testName" levels="Trace,Debug,Info,Warn,Error,Fatal" final="true"/>

With this configuration, logs are archived every day, but I expect a new archive file every week.

I fix this bug.

@codecov
Copy link

codecov bot commented May 5, 2017

Codecov Report

Merging #2093 into master will increase coverage by <1%.
The diff coverage is 0%.

@@           Coverage Diff           @@
##           master   #2093    +/-   ##
=======================================
+ Coverage      81%     81%   +<1%     
=======================================
  Files         289     289            
  Lines       19943   19949     +6     
  Branches     2359    2359            
=======================================
+ Hits        16190   16201    +11     
+ Misses       3147    3143     -4     
+ Partials      606     605     -1

@304NotModified 304NotModified added this to the 4.4.9 milestone May 5, 2017
@304NotModified 304NotModified added the bug Bug report / Bug fix label May 5, 2017
@304NotModified
Copy link
Member

304NotModified commented May 5, 2017

fixes #2089

@304NotModified
Copy link
Member

@RussianDragon

any idea how we could unit test this? So we won't break it in the future?

@304NotModified
Copy link
Member

unit test could be later :)

@304NotModified 304NotModified merged commit 6c1f912 into NLog:master May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report / Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants