public virtual bool BeginLog()
        {
            if (Settings.UseFrametimeMode == true &&
                ServerState != ServerState.Connected ||
                ServerState == ServerState.Stop)
            {
                return(false);
            }

            if (LogState != ServerState.Stop)
            {
                StopLog();
            }

            string targetLogName = null;

            try
            {
                targetLogName = Settings.UseFrametimeMode == true
                    ? Path.GetFileNameWithoutExtension(FrametimeServer.ConnectedApp)
                    : LogName;
            }
            catch { }

            if (LogServer.Open(LogDirectory, targetLogName, Settings.LogFileFormat))
            {
                LogServer.Append(Regex.Unescape(Settings.StartText));
                currentFrame     = 0;
                currentFrametime = 0;
                LogState         = ServerState.Begin;
            }

            return(LogState != ServerState.Stop);
        }
Пример #2
0
 static void Main(string[] args)
 {
     mServer = new LogServer();
     mServer.Open();
     Console.Read();
 }