Logger

Control runtime logging with Serilog minimum level and custom logger configuration.

Minimum Level

Use WithMinimumLogLevel to set runtime log filtering (Verbose, Debug, Information, Warning, Error, Fatal).

Custom Logger Factory

Use WithLoggerConfig(() => new LoggerConfiguration(...)) to inject a project-specific Serilog setup.

Configuration-Based Logging

Minimum log level can also be set through JSON/CLI using LoadStrike:MinimumLogLevel or --minimumloglevel. Accepted tokens map to log level names and numeric values (0..5). Invalid values are ignored so the existing/default level stays active.

Feature Usage Samples

How to use snippets for Logger.

Switch between C#, Java, Python, TypeScript, and JavaScript to see the native SDK shape for this sample.

Licensing note: every runnable sample requires a valid runner key via WithRunnerKey("...") or config key LoadStrike:RunnerKey.

Logger

LoadStrikeRunner.RegisterScenarios(scenario)
    .WithMinimumLogLevel(LogEventLevel.Information)
    .WithLoggerConfig(() => new LoggerConfiguration().WriteTo.Console())
    .WithRunnerKey("rkl_your_local_runner_key")
    .Run();

Logger APIs

WithMinimumLogLevel

Set the minimum runtime log level so lower-priority events are filtered out before they are written.

WithLoggerConfig

Provide a custom Serilog configuration factory when your project needs specific sinks or enrichers.

Named levels

Verbose, Debug, Information, Warning, Error, and Fatal are supported across the public config surface.

Numeric levels

Config-based logging also accepts numeric 0 through 5 tokens that map to the same ordered levels.