public IndentationHandle(
            Logger logger)
        {
            this.logger = logger;

            logger.IncreaseIndentation();
        }
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="socket"></param>
 public SMTPSessionIncoming(Socket socket, Logger logger, bool RequireAuth)
 {
     _socket      = socket;
     _Logger      = logger;
     _authed      = false;
     _requireAUTH = RequireAuth;
 }
예제 #3
0
        static Logger()
        {
            var dirPath = Path.Combine(Environment.CurrentDirectory, "Logs");
            var date    = DateTime.Now;
            var path    = Path.Combine(dirPath, $"Log for {date.ToString("HH.mm.ss K dd.MM.yyyy").Replace(":", ".")}.txt");
            var storage = new StreamWriter(IOUtils.CreateFile(path, FileAccess.Write, FileShare.ReadWrite), Encoding.UTF8);

            _rootLogger = new Logging.Logger(storage);
            var ioLogPath = Path.Combine(dirPath, $"IO Log for {date.ToString("HH.mm.ss K dd.MM.yyyy").Replace(":", ".")}.txt");

            _ioLogStream = new StreamWriter(IOUtils.CreateFile(ioLogPath, FileAccess.Write, FileShare.ReadWrite), Encoding.UTF8);
        }
예제 #4
0
        public void DisplayLogboard()
        {
            logBoard.SetActive(true);
            LogBoard lb = logBoard.GetComponent <LogBoard>();

            lb.ClearRecords();
            List <ActionEventInfo> events = Logger.GetLoggedEvents();

            for (var i = events.Count - 1; i >= 0; i--)
            {
                lb.AddRecord(events[i]);
            }
        }