Пример #1
0
        public void Info(FileInfo file, string message)
        {
            logs.Add(KeyValueLog.New(KeyValueLogType.Info, file, message));

            if (ShowProcess && OutputFilter != KeyValueLogType.Warning &&
                OutputFilter != KeyValueLogType.Error)
            {
                string fn = file != null ? file.FullName : "";
                $"INFO: {fn}".Out();
                message.Out();
            }
        }
Пример #2
0
        public void Error(FileInfo file, string message)
        {
            Status = ProcessStatus.Errors;

            logs.Add(KeyValueLog.New(KeyValueLogType.Error, file, message));

            if (ShowProcess)
            {
                string fn = file != null ? file.FullName : "";
                $"ERROR: {fn}".OutRed();
                message.OutRed();
            }
        }
Пример #3
0
        public void Warning(FileInfo file, string message)
        {
            if (Status == ProcessStatus.Ok)
            {
                Status = ProcessStatus.Warnings;
            }

            logs.Add(KeyValueLog.New(KeyValueLogType.Warning, file, message));

            if (ShowProcess && OutputFilter != KeyValueLogType.Error)
            {
                string fn = file != null ? file.FullName : "";
                $"WARNING: {fn}".OutYellow();
                message.OutYellow();
            }
        }