Exemplo n.º 1
0
        /// <summary>
        /// Reads the used log files in a given vpn config file
        /// </summary>
        /// <param name="config">the file to read</param>
        /// <returns>the log file, <code>null</code> if none is specified</returns>
        protected string getLogFile(string config)
        {
            ConfigParser parser = new ConfigParser(config);

            string[] logFiles = parser.GetValue("log");
            if (logFiles == null)
            {
                logFiles = parser.GetValue("log-append");
                if (logFiles == null)
                {
                    return(null);
                }
                else
                {
                    return(logFiles[1]);
                }
            }
            else
            {
                return(logFiles[1]);
            }
        }