void AddLog(LoggerEntry entry)
        {
            var log = new Controls.LoggerEntry
            {
                EntryText = entry.Message
            };

            logger.Children.Add(log);
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public void Log <TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func <TState, Exception, string> formatter)
        {
            if (IsEnabled(logLevel) == false)
            {
                return;
            }

            var loggerEntry = new LoggerEntry()
            {
                Message  = formatter(state, exception),
                Severity = logLevel
            };

            SaveToLog(loggerEntry);
        }