<PackageReference Include="NLog" Version="6.1.1" />

NLog.SetupLogFactoryBuilderExtensions

public static class SetupLogFactoryBuilderExtensions
Extension methods to setup general option before loading NLog LoggingConfiguration

Mark Assembly as hidden, so Assembly methods are excluded when resolving ${callsite} from StackTrace

Mark Type as hidden, so Type methods are excluded when resolving ${callsite} from StackTrace

public static ISetupLogFactoryBuilder SetAutoShutdown(this ISetupLogFactoryBuilder configBuilder, bool enabled)

Sets whether to automatically call Shutdown on AppDomain.Unload or AppDomain.ProcessExit

Sets the default culture info to use as FormatProvider.

public static ISetupLogFactoryBuilder SetGlobalContextProperty(this ISetupLogFactoryBuilder configBuilder, string name, object value)

Updates the dictionary GlobalDiagnosticsContext ${gdc:item=} with the name-value-pair

public static ISetupLogFactoryBuilder SetGlobalThreshold(this ISetupLogFactoryBuilder configBuilder, LogLevel logLevel)

Sets the global log level threshold. Log events below this threshold are not logged.

public static ISetupLogFactoryBuilder SetThrowConfigExceptions(this ISetupLogFactoryBuilder configBuilder, bool enabled)

Gets or sets a value indicating whether NLogConfigurationException should be thrown on configuration errors

Configures the global time-source used for all logevents to use AccurateLocalTimeSource

Configures the global time-source used for all logevents to use AccurateUtcTimeSource

public static ISetupLogFactoryBuilder SetTimeSource(this ISetupLogFactoryBuilder configBuilder, TimeSource timeSource)

Configures the global time-source used for all logevents