zoukankan      html  css  js  c++  java
  • LogData

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using WindowsFormsApplication3.Model;
    using WindowsFormsApplication3.Enums;
    
    namespace WindowsFormsApplication3.DataStorge
    {
        public class LogData
        {
            public List<LogEntry> logList;
    
            public LogData()
            {
                logList = new List<LogEntry>();
            }
            
    
            public void Error(string format, params object[] objects) { 
                Error(string.Format(format,objects));
            }
            public void Error(CheckoutStep checkoutStep, string message)
            {
                message = string.Format("ERROR {0}", message);
                WriteLine(checkoutStep, message, true);
            }
    
            public void Start(string format, params object[] objects)
            {
                Start(string.Format(format, objects));
            }
            public void Start(CheckoutStep checkoutStep, string message)
            {
                message = string.Format("START {0}", message);
                WriteLine(checkoutStep, message, true);
            }
    
            public void Info(CheckoutStep checkoutStep, string message) {
                message = string.Format("INFO {0}", message);
                WriteLine(checkoutStep, message, false);
            }
            public void Info(string format, params object[] objects) {
                Info(string.Format(format, objects));
            }
    
            public void Warn(CheckoutStep checkoutStep, string message)
            {
                message = string.Format("WARN {0}", message);
                WriteLine(checkoutStep, message, false);
            }
            public void Warn(string format, params object[] objects)
            {
                Info(string.Format(format, objects));
            }
    
            public void Finish(string format, params object[] objects)
            {
                Finish(string.Format(format, objects));
            }
            public void Finish(CheckoutStep checkoutStep, string message)
            {
                message = string.Format("FINISH {0}", message);
                WriteLine(checkoutStep, message, true);
            }
    
            public void WriteLine(CheckoutStep checkoutStep,string message,bool isError)
            {
                logList.Add(new LogEntry(checkoutStep, message, isError));
            }
        }
    }
  • 相关阅读:
    第01组 Alpha冲刺(5/6)
    第01组 Alpha冲刺(4/6)
    第01组 Alpha冲刺(3/6)
    第01组 Alpha冲刺(2/6)
    第01组 Alpha冲刺(1/6)
    第01组(17)需求分析报告
    第01组(17)团队展示
    结对编程作业
    Leetcode 每日一题:1014. 最佳观光组合
    Leetcode13. 罗马数字转整数
  • 原文地址:https://www.cnblogs.com/rosizel/p/3861614.html
Copyright © 2011-2022 走看看