Skip to content

ConsoleTarget & ColoredConsoleTarget - Added AutoFlush and improve default flush behavior#3278

Merged
repo-ranger[bot] merged 1 commit intoNLog:devfrom
snakefoot:ConsoleTargetAutoFlush
Apr 5, 2019
Merged

ConsoleTarget & ColoredConsoleTarget - Added AutoFlush and improve default flush behavior#3278
repo-ranger[bot] merged 1 commit intoNLog:devfrom
snakefoot:ConsoleTargetAutoFlush

Conversation

@snakefoot
Copy link
Copy Markdown
Contributor

Added AutoFlush to enable flush after each Console.WriteLine (Default = false)

When doing pipe to file or have assigned a custom TextWriter to Console.Out (without StreamWriter.AutoFlush = true) then extra help is needed.

See also: https://stackoverflow.com/questions/16791167/console-writeline-c-sharp-loses-stdout-when-logging

@304NotModified 304NotModified changed the title ConsoleTarget - Flush Console.Out on explict flush or close. ConsoleTarget & ColoredConsoleTarget - Added AutoFlush and improve default flush behavior Apr 4, 2019
@304NotModified
Copy link
Copy Markdown
Member

👍

@304NotModified 304NotModified added enhancement Improvement on existing feature feature console-target labels Apr 4, 2019
@304NotModified 304NotModified added this to the 4.6.3 milestone Apr 4, 2019
@snakefoot snakefoot force-pushed the ConsoleTargetAutoFlush branch 2 times, most recently from 0780e5a to 4ad66a7 Compare April 4, 2019 23:13
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2019

Codecov Report

Merging #3278 into dev will decrease coverage by <1%.
The diff coverage is 61%.

@@          Coverage Diff           @@
##             dev   #3278    +/-   ##
======================================
- Coverage     80%     80%   -<1%     
======================================
  Files        356     356            
  Lines      28007   28052    +45     
  Branches    3728    3732     +4     
======================================
+ Hits       22395   22408    +13     
- Misses      4538    4567    +29     
- Partials    1074    1077     +3

@snakefoot snakefoot force-pushed the ConsoleTargetAutoFlush branch from 4ad66a7 to 43f63ba Compare April 5, 2019 05:20
…toFlush to enable flush after each Console.WriteLine
@snakefoot snakefoot force-pushed the ConsoleTargetAutoFlush branch from 43f63ba to 4561b4e Compare April 5, 2019 05:37
@repo-ranger repo-ranger bot merged commit 846633f into NLog:dev Apr 5, 2019
@snakefoot snakefoot deleted the ConsoleTargetAutoFlush branch April 4, 2020 12:58
@snakefoot
Copy link
Copy Markdown
Contributor Author

Updated wiki:

https://github.com/NLog/NLog/wiki/Console-target
https://github.com/NLog/NLog/wiki/ColoredConsole-target

@snakefoot snakefoot added the documentation done all docs done (wiki, api docs, lists on nlog-project.org, xmldocs) label Apr 26, 2020
@304NotModified
Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

console-target documentation done all docs done (wiki, api docs, lists on nlog-project.org, xmldocs) enhancement Improvement on existing feature feature needs documentation on wiki

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants