Esempio n. 1
0
        public string GetShortLogs(LogType type          = LogType.Success | LogType.Warning | LogType.Error
                                   , bool moveLogPointer = true, int maxVerbosity = 3)
        {
            if (AllLogs.Count > _lastReadLogIndex + 1)
            {
                var logs = AllLogs.GetRange(_lastReadLogIndex + 1, AllLogs.Count - _lastReadLogIndex - 1)
                           .Where(l => l.Verbosity <= maxVerbosity && type.HasFlag(l.Type))
                           .Select(l => GetShortLog(l));

                if (moveLogPointer)
                {
                    _lastReadLogIndex = AllLogs.Count;
                }

                return(string.Join("\n", logs));
            }
            else
            {
                return("");
            }
        }