Skip to content

Instantly share code, notes, and snippets.

View Timmate's full-sized avatar

Timofei Kornev Timmate

View GitHub Profile
@mikey-t
mikey-t / ConsoleOutputLog.cs
Last active April 5, 2024 13:21
Simple C# utility class to output to both console and a log file at the same time. Use it by simply calling Output.Write() and Output.WriteLine().
public class Output
{
private readonly string LogDirPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");
private static Output _outputSingleton;
private static Output OutputSingleton
{
get
{
if (_outputSingleton == null)