IISLogParser 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package IISLogParser --version 1.0.0
NuGet\Install-Package IISLogParser -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IISLogParser" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IISLogParser --version 1.0.0
#r "nuget: IISLogParser, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install IISLogParser as a Cake Addin
#addin nuget:?package=IISLogParser&version=1.0.0

// Install IISLogParser as a Cake Tool
#tool nuget:?package=IISLogParser&version=1.0.0

This library allows the import and parsing of IIS log files from the filesystem to a List <IISLogEvent>. This project arose from the need to have a component that allows both the import of small log files as well as larger files (> 1Gb).

Processing

The processing engine detects the size of the file to be processed and if it is less than 50 Mb it does a single read to memory and treats the data from there, for larger files to avoid OutOfMemory, reading is done line by line.

Properties

FilePath [string] → Path to the file

MissingRecords [bool] → Flag that indicates if there are any missing records. For larger files, this property can be flagged as true.

CurrentFileRecord [int] → When processing large files this will store the currently file record index. For example, if the file has 100000 log events and the processing is done in blocks of 250000(MaxFileRecord2Read), we'll have 4 cycles each on with this flag set with 250000, 500000, 750000 and finally 1000000.

MaxFileRecord2Read [int] → Controls the maximum limit of items that the <IISLogEvent> List can have. If the number of events in the log file exceeds MaxFileRecord2Read the MissingRecords variable assumes the value of true and we can perform one more reading of a MaxFileRecord2Read set. For files less than 50Mb this value has no effect because the engine performs a single read to memory and treats the data from there. For example, if the file has 1000000 log events and this is set to 250000 we will 4 read cycle each one extracting a List<IISLogEvent> with a count of 250000.

Usage :

        List<IISLogEvent> logs = new List<IISLogEvent>();
        using (ParserEngine parser = new ParserEngine([filepath]))
        {
            while (parser.MissingRecords)
            {
                logs = parser.ParseLog().ToList();
            }
        }
Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.0 3,747 4/26/2022
1.2.0 426 4/26/2022
1.1.0 4,288 11/25/2018
1.0.1 727 11/23/2018
1.0.0 734 11/22/2018

Summary of changes made in this release of the package.