Beispiel #1
0
        public void RunManager(string logPathDirectory)
        {
            _logFiles           = LogServiceHelper.GetDirectoryFiles(logPathDirectory);
            _bookmarkCollection = new HashSet <LogFileBookmark>();
            //check to see if the cache file for bookmarks exist
            if (File.Exists(_CACHE_FILE))
            {
                //update the bookmarks file by checking the cache file for its latest bookmark and from there check to see
                //if there are new entries and then check for new files different than what is inside of the cache
                StreamReader sr = new StreamReader(_CACHE_FILE);
            }
            else
            {
                foreach (string logFilePath in _logFiles.Keys)
                {
                    ParseFile(logFilePath, 0);
                }

                //Cache the bookmarks made when parsing the file
                StreamWriter sw = new StreamWriter(_CACHE_FILE);
                foreach (LogFileBookmark bookmark in _bookmarkCollection)
                {
                    sw.WriteLine(bookmark.BookmarkDescription);
                }
                sw.Flush();
            }
        }
Beispiel #2
0
        /// <summary>
        /// Set the location of the log files and create bookmarks for each of these log files.
        /// </summary>
        /// <param name="path">Directory that holds all the log files</param>
        public void SetDataEngine(string path)
        {
            AzureEnvironment e = new AzureEnvironment();

            _logFiles = LogServiceHelper.GetDirectoryFiles(e.LogFiles);
            //LogFileBookmarkManager bookmarkManager = new LogFileBookmarkManager();
            //bookmarkManager.RunManager(path);
        }