Table of Contents

Method ConfigureFileLogging

Namespace
LMKit.Global
Assembly
LM-Kit.NET.dll

ConfigureFileLogging(string, LMKitLogLevel, bool, bool, bool)

Configures a support-friendly logging pipeline that writes LM-Kit logs to a file in a single call.

public static void ConfigureFileLogging(string logFilePath, Runtime.LMKitLogLevel level = LMKitLogLevel.Trace, bool enableBackendLogging = true, bool append = false, bool autoFlush = true)

Parameters

logFilePath string

The target log file path (relative or absolute). The parent directory is created automatically if missing.

level Runtime.LMKitLogLevel

The log verbosity level to apply (default: Trace).

enableBackendLogging bool

When true, native backend diagnostics are forwarded to LM-Kit’s managed logging pipeline.

append bool

When true, appends to an existing file. When false, overwrites the file.

autoFlush bool

When true, flushes to disk after each write. Recommended for customer support scenarios.

Remarks

Design goals:

  • Single API call for end users to produce a log file for support.
  • Writer lifetime is owned by Runtime. The file is closed on process exit and when reconfigured.
  • The file is opened with ReadWrite so it can be inspected while the app is running.