1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 16:06:15 +00:00
2018-02-28 13:53:29 +01:00

26 lines
600 B
C#

using System;
using System.IO;
namespace CryptoExchange.Net.Logging
{
public class Log
{
public TextWriter TextWriter { get; internal set; } = new DebugTextWriter();
public LogVerbosity Level { get; internal set; } = LogVerbosity.Warning;
public void Write(LogVerbosity logType, string message)
{
if ((int)logType >= (int)Level)
TextWriter.WriteLine($"{DateTime.Now:hh:mm:ss:fff} | {logType} | {message}");
}
}
public enum LogVerbosity
{
Debug,
Warning,
Error,
None
}
}