Class ProxyLoggingOptions
Central configuration for the proxy's built-in diagnostic logging. A single instance is owned by Logging; mutate its properties (or replace the whole object) before Start(bool) to control how the proxy reports every caught exception and diagnostic event. Logging never blocks proxy traffic: built-in sinks are asynchronous and best-effort, and setting Enabled to false removes all logging overhead (no timestamps are read, no strings are formatted, no providers run).
Inherited Members
Namespace: Titanium.Web.Proxy.Logging
Assembly: Titanium.Web.Proxy.dll
Syntax
public sealed class ProxyLoggingOptions
Properties
| Edit this page View SourceEnableConsole
Whether the built-in console sink is active. Defaults to true. Ignored when LoggerFactory is set.
Declaration
public bool EnableConsole { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
EnableConsoleColors
Whether the built-in console sink colors each line by LogLevel using ANSI escape
codes (dim for Trace/Debug, default for
Information, yellow for Warning, red for
Error, bold red for Critical). Defaults to
true; automatically suppressed - regardless of this setting - for a stream
(stdout/stderr) that is redirected (e.g. piped to a file), or entirely when the
NO_COLOR environment variable (see https://no-color.org/) is set, so
redirected output/log files never contain raw escape codes.
Declaration
public bool EnableConsoleColors { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
EnableFile
Whether the built-in rolling-file sink is active. Defaults to false. Ignored when LoggerFactory is set.
Declaration
public bool EnableFile { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Enabled
Master switch for all proxy logging. When false (default is true) the proxy uses a no-op logger; no log-related work of any kind is performed anywhere in the library, so this is the zero-overhead configuration for users who do not want logging at all.
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
FilePath
Path of the log file used by the built-in rolling-file sink. Relative paths are resolved against the current working directory. The containing directory is created on demand.
Declaration
public string FilePath { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LoggerFactory
Optional externally supplied ILoggerFactory (e.g. bridging to Serilog, NLog, or an ASP.NET Core host's logging pipeline). When set, the built-in Console/File sinks are not created and this factory is used verbatim; the proxy never disposes a factory it does not own.
Declaration
public ILoggerFactory? LoggerFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| ILoggerFactory |
MaxFileSizeBytes
Maximum size, in bytes, a log file is allowed to reach before it is rolled. Defaults to 10 MiB.
Declaration
public long MaxFileSizeBytes { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
MaxRolledFiles
Maximum number of rolled-over log files retained alongside the active log file. Defaults to 5.
Declaration
public int MaxRolledFiles { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
MinimumLevel
The minimum LogLevel that is actually written to any sink. Every caught exception in the proxy is still reported to the gateway regardless of this setting - this only controls how much of that stream is materialized/written. Defaults to Error so out-of-the-box behavior stays quiet, while still surfacing every genuinely unexpected failure.
Declaration
public LogLevel MinimumLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| LogLevel |
QueueCapacity
Capacity of the bounded in-memory queue used by each built-in sink before entries are considered saturated (see the sink's own delivery guarantees). Defaults to 4096.
Declaration
public int QueueCapacity { get; set; }
Property Value
| Type | Description |
|---|---|
| int |