NLog.SetupLogFactoryBuilderExtensions
Extension methods to setup general option before loading NLog LoggingConfiguration
public static ISetupLogFactoryBuilder AddCallSiteHiddenAssembly(this ISetupLogFactoryBuilder configBuilder, Assembly assembly)
Mark Assembly as hidden, so Assembly methods are excluded when resolving ${callsite} from StackTrace
public static ISetupLogFactoryBuilder AddCallSiteHiddenClassType(this ISetupLogFactoryBuilder configBuilder, Type type)
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
public static ISetupLogFactoryBuilder SetDefaultCultureInfo(this ISetupLogFactoryBuilder configBuilder, CultureInfo cultureInfo)
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
public static ISetupLogFactoryBuilder SetTimeSourcAccurateLocal(this ISetupLogFactoryBuilder configBuilder)
Configures the global time-source used for all logevents to use AccurateLocalTimeSource
public static ISetupLogFactoryBuilder SetTimeSourcAccurateUtc(this ISetupLogFactoryBuilder configBuilder)
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