예제 #1
0
        public override void Write(string message, LogLevel logLevel)
        {
            var logMessage = new LogMessageModel
            {
                Message   = message,
                LogLevel  = logLevel.ToString(),
                TimeStamp = DateTimeOffset.Now,
                ThreadId  = Environment.CurrentManagedThreadId
            };

            _elasticsearchService.IndexDocument(logMessage);

            base.Write(message, logLevel);
        }