示例#1
0
        /// <summary>
        /// Returns paths of the log files
        /// </summary>
        /// <param name="logCfg">LogCfg class instance</param>
        /// <returns>Array of file paths</returns>
        public static string[] GetLogFiles(LogCfg logCfg)
        {
            List <string> files = new List <string>();

            foreach (var path in logCfg.GetLogFoldersPaths())
            {
                files.AddRange(Directory.GetFiles(path, "*.log", SearchOption.AllDirectories));
            }

            return(files.Distinct().ToArray());
        }
 public TechLogEventReader(LogCfg logcfg, Action <string> callback)
 {
     logFiles      = TechLogHelper.GetLogFiles(logcfg);
     this.callback = callback;
 }