Example #1
0
        public async Task Log(string message, LogLevel logLevel = LogLevel.Info)
        {
            LogMessage newLogMessage = null;
            await Task.Run(() =>
            {
                newLogMessage = new LogMessage(message, logLevel);
                _currentLogs.Add(newLogMessage);
            });

            NewLogEvent?.Invoke(newLogMessage);
        }
Example #2
0
 protected virtual void OnNewLogEvent(EventArgs e)
 {
     NewLogEvent?.Invoke(this, e);
 }