Mostly all need to log long running console apps or any other windows services,usually using extra third party but not customizable,here a simple way which gives all flexibility.
Just take the code & run...you will understand easily everything & extend whatever the way you wanted
Below output is produced from same code.
nammadhu/POC.ConsoleAppFileWriting
Console.WritelLine() itslef logging to additional file or any customization easy mode pluggable to any existing projects anywhewhere
C#