Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 598 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 598 Bytes

logfile-analyzer

Represents a .NET Standard 2.0 log file analyzer

Installation

Install-Package LogFileAnalyzer -Version 1.0.0

Configuration

Add this to your Program.cs file

public static void Main(string[] args)
{
	// setup the log file analyzer
	var analyzer = new LogFileAnalyzer(Path.Combine(AppContext.BaseDirectory, "YourLogDirectory"), new List<string> { ".log" });
	
	// wire up the error event
	this.analyzer.ErrorDetected += (o, e) =>
	{
		Console.WriteLine($"Found error : {e.LogFileEntry}");
	};
	
	// start analyzing files
	this.analyzer.Analyze();
}