Пример #1
0
        public void Log(string Text, bool AddStuff)
        {
            try
            {
                if (!File.Exists(logfile))
                {
                    File.WriteAllText(logfile, "");
                }

                string log = File.ReadAllText(logfile);
                if (AddStuff)
                {
                    Text = CS.Timestamp() + Text;
                }
                log = (log + CS.NL + Text);
                File.WriteAllText(logfile, log);
            }
            catch (IOException E) //log file in use, change the name
            {
                FileInfo FI = new FileInfo(logfile);
                logfile = FI.FullName.Replace(FI.Extension, "_.txt");
            }
        }
Пример #2
0
        internal static void AddThread(System.Threading.Thread T)
        {
            Threads.Add(T);

            CS.SysLog("[WF] Thread added.");
        }