Пример #1
0
        void Awake()
        {
            _socket = new SocketAppender();
            _defaultFormatter = new DefaultLogMessageFormatter();
            _timestampFormatter = new TimestampFormatter();
            _colorFormatter = new ColorCodeFormatter();

            if (cacheLogsWhenNotConnected) {
                LoggerFactory.AddAppender(send);
            }
        }
Пример #2
0
 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);
     });
 }
Пример #3
0
 void Awake()
 {
     _fileWriter = new FileWriter(filePath);
     _defaultFormatter = new DefaultLogMessageFormatter();
     _timestampFormatter = new TimestampFormatter();
 }