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

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

Merged
merged 1 commit into from Apr 5, 2019

Conversation

snakefoot
Copy link
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
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

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

…toFlush to enable flush after each Console.WriteLine
@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
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
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.

None yet

2 participants