void Awake() { _socket = new SocketAppender(); _defaultFormatter = new DefaultLogMessageFormatter(); _timestampFormatter = new TimestampFormatter(); _colorFormatter = new ColorCodeFormatter(); if (cacheLogsWhenNotConnected) { LoggerFactory.AddAppender(send); } }
static void consoleLogTest() { var defaultFormatter = new DefaultLogMessageFormatter(); var timestampFormatter = new TimestampFormatter(); var colorFormatter = new ColorCodeFormatter(); LoggerFactory.AddAppender((logger, logLevel, message) => { message = defaultFormatter.FormatMessage(logger, logLevel, message); message = timestampFormatter.FormatMessage(logger, logLevel, message); message = colorFormatter.FormatMessage(logLevel, message); Console.WriteLine(message); }); }
void Awake() { _fileWriter = new FileWriter(filePath); _defaultFormatter = new DefaultLogMessageFormatter(); _timestampFormatter = new TimestampFormatter(); }