Loq.Classic
0.1.79
dotnet add package Loq.Classic --version 0.1.79
NuGet\Install-Package Loq.Classic -Version 0.1.79
<PackageReference Include="Loq.Classic" Version="0.1.79" />
<PackageVersion Include="Loq.Classic" Version="0.1.79" />
<PackageReference Include="Loq.Classic" />
paket add Loq.Classic --version 0.1.79
#r "nuget: Loq.Classic, 0.1.79"
#:package Loq.Classic@0.1.79
#addin nuget:?package=Loq.Classic&version=0.1.79
#tool nuget:?package=Loq.Classic&version=0.1.79
Loq.Classic
Drop-in replacement for Microsoft Log Parser 2.2's MSUtil.LogQuery COM API, for .NET.
loq is a cross-platform reimplementation of MS Log Parser in Rust. Loq.Classic wraps the native loq library in the same shape as the original COM interface so existing scripts and applications can be ported with minimal changes — most of the time you only need to replace the COM object instantiation.
Install
dotnet add package Loq.Classic
The package transitively pulls in Loq.Native, which ships native binaries for win-x64 and linux-x64 automatically.
Quick start — drop-in replacement
Classic ASP / VBScript:
Set oQuery = CreateObject("MSUtil.LogQuery")
Set oRS = oQuery.Execute("SELECT * FROM C:\logs\access.log")
.NET equivalent with Loq.Classic:
using Loq.Classic;
using var query = new LogQuery();
using var rs = query.Execute(@"SELECT * FROM C:\logs\access.log");
while (!rs.AtEnd)
{
var record = rs.GetRecord();
Console.WriteLine(record.GetValue("c-ip"));
rs.MoveNext();
}
With format-specific input contexts
Same API surface as the COM COM*InputContext types:
using Loq.Classic;
using Loq.Classic.InputFormats;
var input = new COMTSVInputContext
{
headerRow = false,
nSkipLines = 1,
lineFilter = "+2026-04-23"
};
using var query = new LogQuery();
using var rs = query.Execute(
"SELECT Field1, Field2 FROM 'D:\\logs\\sample.txt'",
input);
Supported input contexts: COMCSVInputContext, COMTSVInputContext, COMW3CInputContext, COMIISW3CInputContext, COMIISIISInputContext, COMIISNCSAInputContext, COMIISBINInputContext, COMTextLineInputContext, COMTextWordInputContext, COMURLScanLogInputContext, COMHttpErrorInputContext, COMNetMonInputContext, COMRegistryInputContext, COMFileSystemInputContext, COMXMLInputContext.
Supported output contexts (for ExecuteBatch): CSV, TSV, JSON, XML, W3C, IIS, DATAGRID, SQLite, SQL Server, MySQL / Aurora MySQL, Chart (PNG/SVG), and several more. For Aurora MySQL writes, use COMMySQLOutputContext with a mysql://...?ssl-mode=REQUIRED URL pointing at the writer cluster endpoint — see docs/output-formats/mysql.md.
SQL syntax
Same as MS Log Parser 2.2 — see the LP22 syntax reference for the supported SELECT/FROM/WHERE/GROUP BY/ORDER BY/USING/INTO clauses, the 100+ built-in functions (SUBSTR, QUANTIZE, EXTRACT_TOKEN, TO_TIMESTAMP, HASHMD5, etc.), and LP22-isms like comma-separated FROM (FROM 'a','b','c' reads from all listed files), wildcard FROM paths (case-insensitive on every platform, matching NTFS), and INTO chart targets.
What's not the same as LP22
Executereturns aLogRecordSet(notILogRecordsetCOM type) — same shape, different namespace.- Fully cross-platform: works on Linux and macOS in addition to Windows. The native library is bundled per-RID inside
Loq.Native. IDisposable— callDispose()(orusing var) to release native handles. The original COM API relied on COM ref-counting.
Need a more idiomatic .NET API?
If you don't need LP22 compat — strongly-typed results, IEnumerable<T>, DataTable conversion — install the Loq package instead.
Source / issues
- Source: https://github.com/chaynes81-ux/loq
- Releases & docs: https://chaynes81-ux.github.io/loq-releases/
- Issues: file at the GitHub repo above.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Loq.Native (>= 0.1.79)
- System.Text.Json (>= 8.0.5)
-
net8.0
- Loq.Native (>= 0.1.79)
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 |
|---|---|---|
| 0.1.79 | 144 | 8/5/2026 |
| 0.1.78 | 119 | 8/4/2026 |
| 0.1.77 | 120 | 7/26/2026 |
| 0.1.76 | 120 | 7/23/2026 |
| 0.1.75 | 137 | 7/8/2026 |
| 0.1.74 | 130 | 7/8/2026 |
| 0.1.73 | 135 | 6/24/2026 |
| 0.1.72 | 130 | 6/24/2026 |
| 0.1.71 | 137 | 6/13/2026 |
| 0.1.70 | 131 | 6/12/2026 |
| 0.1.69 | 121 | 6/11/2026 |
| 0.1.68 | 128 | 6/10/2026 |
| 0.1.67 | 115 | 6/10/2026 |
| 0.1.66 | 129 | 6/9/2026 |
| 0.1.65 | 133 | 6/9/2026 |
| 0.1.64 | 130 | 6/1/2026 |
| 0.1.63 | 131 | 5/8/2026 |
| 0.1.62 | 121 | 5/5/2026 |
| 0.1.61 | 111 | 5/5/2026 |
| 0.1.60 | 107 | 5/5/2026 |