Fast.Logging public API
Targets: net8.0;net9.0;net10.0. This is a declaration and XML-comment reference. See the module guide for usage and constraints.
Source commit: 43554c07f6c216f80b509bd535c0a5b66ae7f2e8. Maintained through scripts/export-dotnet-api.ps1 -Language en; ordinary site builds consume this file directly.
Fast.Logging.LogContext
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public sealed class LogContextLogging context
Fast.Logging.LogContext.LogContext
Source · Targets: net8.0, net9.0, net10.0
public LogContext()Initializes a new instance of the class
Fast.Logging.LogContext.Properties
Source · Targets: net8.0, net9.0, net10.0
public IDictionary<object, object> Properties { get; set; }Logging context data
Fast.Logging.LogMessage
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public struct LogMessageStructured log message
Fast.Logging.LogMessage.LogMessage
Source · Targets: net8.0, net9.0, net10.0
public LogMessage(string logName, LogLevel logLevel, EventId? eventId, string message, Exception exception,
LogContext context, object state, DateTime logDateTime, int threadId, bool useUtcTimestamp, string traceId)Initializes a new instance of the class
- Parameter
logName: Log category name - Parameter
logLevel: Log level - Parameter
eventId: Logging event identifier - Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
context: Current logging context - Parameter
state: Current state value - Parameter
logDateTime: Log timestamp - Parameter
threadId: Unique thread identifier - Parameter
useUtcTimestamp: Whether to use UTC for log timestamps - Parameter
traceId: Unique trace identifier
Fast.Logging.LogMessage.LogName
Source · Targets: net8.0, net9.0, net10.0
public string LogName { get; }Logger category name
Fast.Logging.LogMessage.LogLevel
Source · Targets: net8.0, net9.0, net10.0
public LogLevel LogLevel { get; }Log level
Fast.Logging.LogMessage.EventId
Source · Targets: net8.0, net9.0, net10.0
public EventId? EventId { get; }Event ID
Fast.Logging.LogMessage.Message
Source · Targets: net8.0, net9.0, net10.0
public string Message { get; internal set; }Log message
Fast.Logging.LogMessage.Exception
Source · Targets: net8.0, net9.0, net10.0
public Exception Exception { get; }Exception object
Fast.Logging.LogMessage.State
Source · Targets: net8.0, net9.0, net10.0
public object State { get; }Current state value
Remarks: May be of any type
Fast.Logging.LogMessage.LogDateTime
Source · Targets: net8.0, net9.0, net10.0
public DateTime LogDateTime { get; }Log timestamp
Fast.Logging.LogMessage.ThreadId
Source · Targets: net8.0, net9.0, net10.0
public int ThreadId { get; }Thread ID
Fast.Logging.LogMessage.UseUtcTimestamp
Source · Targets: net8.0, net9.0, net10.0
public bool UseUtcTimestamp { get; }Whether to use UTC timestamps
Fast.Logging.LogMessage.TraceId
Source · Targets: net8.0, net9.0, net10.0
public string TraceId { get; }Request/trace ID
Fast.Logging.LogMessage.Context
Source · Targets: net8.0, net9.0, net10.0
public LogContext Context { get; set; }Logging context
Fast.Logging.LogMessage.ToString
Source · Targets: net8.0, net9.0, net10.0
public readonly override string ToString()Documentation is inherited from an interface or base class; consult that declaration.
Fast.Logging.LoggingContext
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class LoggingContextLogging context
Fast.Logging.LoggingContext.OutputStandardMessage
Source · Targets: net8.0, net9.0, net10.0
public static string OutputStandardMessage(LogMessage logMsg, string dateFormat = "yyyy-MM-dd HH:mm:ss.fffffff zzz dddd",
bool isConsole = false, bool disableColors = true, bool withTraceId = false, bool withStackFrame = false)Writes a standard log message
- Parameter
logMsg: Log message to format or write - Parameter
dateFormat: Date/time format string - Parameter
isConsole: Whether to write logs to the console - Parameter
disableColors: Whether to disable console log colors - Parameter
withTraceId: Trace identifier to include - Parameter
withStackFrame: Whether to include the call-stack location in logs - Returns: Writes a standard log message
Fast.Logging.LoggingContext.GetLogLevelString
Source · Targets: net8.0, net9.0, net10.0
public static string GetLogLevelString(LogLevel logLevel)Gets the short name of a log level
- Parameter
logLevel: Log level - Returns: Short log-level name
Fast.Logging.IServiceCollectionExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class IServiceCollectionExtensionDynamic API extensions for IServiceCollection
Fast.Logging.IServiceCollectionExtension.AddLoggingService
Source · Targets: net8.0, net9.0, net10.0
public static IServiceCollection AddLoggingService(this IServiceCollection services, IConfiguration configuration,
string section = "Logging:Fast")Registers logging services
- Parameter
services: The service collection to add services to - Parameter
configuration: Configuration used to read module settings - Parameter
section: JSON configuration section key; defaults to Logging:Fast - Returns: Returns
servicesfor chaining
Fast.Logging.LogContextExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class LogContextExtensionLogContext extensions
Fast.Logging.LogContextExtension.Set
Source · Targets: net8.0, net9.0, net10.0
public static LogContext Set(this LogContext logContext, object key, object value)Sets context data
- Parameter
logContext: Current logging context - Parameter
key: Logging context property key - Parameter
value: Property value to write to the logging context - Returns: Sets context data
Fast.Logging.LogContextExtension.SetRange
Source · Targets: net8.0, net9.0, net10.0
public static LogContext SetRange(this LogContext logContext, IDictionary<object, object> properties)Sets multiple context properties
- Parameter
logContext: Current logging context - Parameter
properties: Properties to write to the context - Returns: Sets multiple context properties
Fast.Logging.LogContextExtension.Get
Source · Targets: net8.0, net9.0, net10.0
public static object Get(this LogContext logContext, object key)Gets context data
- Parameter
logContext: Current logging context - Parameter
key: Logging context property key - Returns: Retrieved context data
Fast.Logging.LogContextExtension.Get
Source · Targets: net8.0, net9.0, net10.0
public static object Get<T>(this LogContext logContext, object key)Gets context data
- Parameter
logContext: Current logging context - Parameter
key: Logging context property key - Type parameter
T: Target type of the context property value - Returns: Retrieved context data
Fast.Logging.LogMessageExtension
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class LogMessageExtensionLogMessage extensions
Fast.Logging.LogMessageExtension.Write
Source · Targets: net8.0, net9.0, net10.0
public static string Write(this LogMessage _, Action<Utf8JsonWriter> writeAction, bool writeIndented = false)Efficiently creates a JSON object string
- Parameter
_: Extension-method receiver; its value is not included in the output - Parameter
writeAction: Delegate that writes properties to the JSON writer - Parameter
writeIndented: Whether to indent the JSON output - Returns: Efficiently creates a JSON object string
Fast.Logging.LogMessageExtension.WriteArray
Source · Targets: net8.0, net9.0, net10.0
public static string WriteArray(this LogMessage logMsg, Action<Utf8JsonWriter> writeAction, bool writeIndented = false)Efficiently creates a JSON array string
- Parameter
logMsg: Log message to format or write - Parameter
writeAction: Delegate that writes properties to the JSON writer - Parameter
writeIndented: Whether to indent the JSON output - Returns: Efficiently creates a JSON array string
Fast.Logging.Log
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class LogGlobal static logging class
Fast.Logging.Log.Default
Source · Targets: net8.0, net9.0, net10.0
public static StringLoggingPart Default()Manual construction
- Returns: Manual construction
Fast.Logging.Log.CreateLogger
Source · Targets: net8.0, net9.0, net10.0
public static ILogger CreateLogger<T>()Creates a logger
- Type parameter
T: Type used as the logger category - Returns: Created logger
Fast.Logging.Log.CreateLoggerFactory
Source · Targets: net8.0, net9.0, net10.0
public static ILoggerFactory CreateLoggerFactory(Action<ILoggingBuilder> configure = null)Creates a logger factory
Remarks: ILoggerFactory implements IDisposable; use using to manage its lifetime
- Parameter
configure: Logging configuration callback - Returns: Created logger factory
Fast.Logging.Log.ScopeContext
Source · Targets: net8.0, net9.0, net10.0
public static (ILogger logger, IDisposable scope) ScopeContext(IDictionary<object, object> properties)Creates a logging scope containing the specified properties
- Parameter
properties: Properties to include in the logging scope; useSystem.Collections.Concurrent.ConcurrentDictionary{TKey,TValue}for concurrent mutation - Returns: Logger and disposable handle used to end the scope
Fast.Logging.Log.ScopeContext
Source · Targets: net8.0, net9.0, net10.0
public static (ILogger logger, IDisposable scope) ScopeContext(Action<LogContext> configure)Creates a logging scope containing the specified properties
- Parameter
configure: Logging context configuration callback - Returns: Logger and disposable handle used to end the scope
Fast.Logging.Log.ScopeContext
Source · Targets: net8.0, net9.0, net10.0
public static (ILogger logger, IDisposable scope) ScopeContext(LogContext context)Creates a logging scope containing the specified properties
- Parameter
context: Current logging context - Returns: Logger and disposable handle used to end the scope
Fast.Logging.Log.Information
Source · Targets: net8.0, net9.0, net10.0
public static void Information(string message, params object[] args)Writes a LogLevel.Information log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Information
Source · Targets: net8.0, net9.0, net10.0
public static void Information(string message, EventId eventId, params object[] args)Writes a LogLevel.Information log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Information
Source · Targets: net8.0, net9.0, net10.0
public static void Information(string message, Exception exception, params object[] args)Writes a LogLevel.Information log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Information
Source · Targets: net8.0, net9.0, net10.0
public static void Information(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Information log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Information
Source · Targets: net8.0, net9.0, net10.0
public static void Information<TClass>(string message, params object[] args)Writes a LogLevel.Information log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Information
Source · Targets: net8.0, net9.0, net10.0
public static void Information<TClass>(string message, EventId eventId, params object[] args)Writes a LogLevel.Information log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Information
Source · Targets: net8.0, net9.0, net10.0
public static void Information<TClass>(string message, Exception exception, params object[] args)Writes a LogLevel.Information log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Information
Source · Targets: net8.0, net9.0, net10.0
public static void Information<TClass>(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Information log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Warning
Source · Targets: net8.0, net9.0, net10.0
public static void Warning(string message, params object[] args)Writes a LogLevel.Warning log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Warning
Source · Targets: net8.0, net9.0, net10.0
public static void Warning(string message, EventId eventId, params object[] args)Writes a LogLevel.Warning log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Warning
Source · Targets: net8.0, net9.0, net10.0
public static void Warning(string message, Exception exception, params object[] args)Writes a LogLevel.Warning log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Warning
Source · Targets: net8.0, net9.0, net10.0
public static void Warning(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Warning log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Warning
Source · Targets: net8.0, net9.0, net10.0
public static void Warning<TClass>(string message, params object[] args)Writes a LogLevel.Warning log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Warning
Source · Targets: net8.0, net9.0, net10.0
public static void Warning<TClass>(string message, EventId eventId, params object[] args)Writes a LogLevel.Warning log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Warning
Source · Targets: net8.0, net9.0, net10.0
public static void Warning<TClass>(string message, Exception exception, params object[] args)Writes a LogLevel.Warning log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Warning
Source · Targets: net8.0, net9.0, net10.0
public static void Warning<TClass>(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Warning log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error(string message, params object[] args)Writes a LogLevel.Error log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error(string message, EventId eventId, params object[] args)Writes a LogLevel.Error log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error(string message, Exception exception, params object[] args)Writes a LogLevel.Error log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Error log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error<TClass>(string message, params object[] args)Writes a LogLevel.Error log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error<TClass>(string message, EventId eventId, params object[] args)Writes a LogLevel.Error log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error<TClass>(string message, Exception exception, params object[] args)Writes a LogLevel.Error log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Error
Source · Targets: net8.0, net9.0, net10.0
public static void Error<TClass>(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Error log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Debug
Source · Targets: net8.0, net9.0, net10.0
public static void Debug(string message, params object[] args)Writes a LogLevel.Debug log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Debug
Source · Targets: net8.0, net9.0, net10.0
public static void Debug(string message, EventId eventId, params object[] args)Writes a LogLevel.Debug log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Debug
Source · Targets: net8.0, net9.0, net10.0
public static void Debug(string message, Exception exception, params object[] args)Writes a LogLevel.Debug log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Debug
Source · Targets: net8.0, net9.0, net10.0
public static void Debug(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Debug log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Debug
Source · Targets: net8.0, net9.0, net10.0
public static void Debug<TClass>(string message, params object[] args)Writes a LogLevel.Debug log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Debug
Source · Targets: net8.0, net9.0, net10.0
public static void Debug<TClass>(string message, EventId eventId, params object[] args)Writes a LogLevel.Debug log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Debug
Source · Targets: net8.0, net9.0, net10.0
public static void Debug<TClass>(string message, Exception exception, params object[] args)Writes a LogLevel.Debug log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Debug
Source · Targets: net8.0, net9.0, net10.0
public static void Debug<TClass>(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Debug log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace(string message, params object[] args)Writes a LogLevel.Trace log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace(string message, EventId eventId, params object[] args)Writes a LogLevel.Trace log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace(string message, Exception exception, params object[] args)Writes a LogLevel.Trace log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Trace log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace<TClass>(string message, params object[] args)Writes a LogLevel.Trace log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace<TClass>(string message, EventId eventId, params object[] args)Writes a LogLevel.Trace log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace<TClass>(string message, Exception exception, params object[] args)Writes a LogLevel.Trace log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Trace
Source · Targets: net8.0, net9.0, net10.0
public static void Trace<TClass>(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Trace log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Critical
Source · Targets: net8.0, net9.0, net10.0
public static void Critical(string message, params object[] args)Writes a LogLevel.Critical log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Critical
Source · Targets: net8.0, net9.0, net10.0
public static void Critical(string message, EventId eventId, params object[] args)Writes a LogLevel.Critical log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Critical
Source · Targets: net8.0, net9.0, net10.0
public static void Critical(string message, Exception exception, params object[] args)Writes a LogLevel.Critical log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Critical
Source · Targets: net8.0, net9.0, net10.0
public static void Critical(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Critical log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message
Fast.Logging.Log.Critical
Source · Targets: net8.0, net9.0, net10.0
public static void Critical<TClass>(string message, params object[] args)Writes a LogLevel.Critical log
- Parameter
message: Message to record or return - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Critical
Source · Targets: net8.0, net9.0, net10.0
public static void Critical<TClass>(string message, EventId eventId, params object[] args)Writes a LogLevel.Critical log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Critical
Source · Targets: net8.0, net9.0, net10.0
public static void Critical<TClass>(string message, Exception exception, params object[] args)Writes a LogLevel.Critical log
- Parameter
message: Message to record or return - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.Log.Critical
Source · Targets: net8.0, net9.0, net10.0
public static void Critical<TClass>(string message, EventId eventId, Exception exception, params object[] args)Writes a LogLevel.Critical log
- Parameter
message: Message to record or return - Parameter
eventId: Logging event identifier - Parameter
exception: Exception to handle - Parameter
args: Arguments used to format the message - Type parameter
TClass: Type of the object to process
Fast.Logging.LoggerFormatter
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public static class LoggerFormatterStatic log formatting class
`Fast.Logging.LoggerFormatter.Json = logMsg =>
{
return logMsg.Write(writer => WriteJson(logMsg, writer));
}`
Source · Targets: net8.0, net9.0, net10.0
public static readonly Func<LogMessage, string> Json = logMsg =>
{
return logMsg.Write(writer => WriteJson(logMsg, writer));
};JSON output formatting
`Fast.Logging.LoggerFormatter.JsonIndented = logMsg =>
{
return logMsg.Write(writer => WriteJson(logMsg, writer), true);
}`
Source · Targets: net8.0, net9.0, net10.0
public static readonly Func<LogMessage, string> JsonIndented = logMsg =>
{
return logMsg.Write(writer => WriteJson(logMsg, writer), true);
};JSON output formatting
Fast.Logging.StringLoggingPart
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public sealed partial class StringLoggingPartPartial class for building string logs
Fast.Logging.StringLoggingPart.Default
Source · Targets: net8.0, net9.0, net10.0
public static StringLoggingPart Default()Default static logging component
- Returns: Default static logging component
Fast.Logging.StringLoggingPart.Message
Source · Targets: net8.0, net9.0, net10.0
public string Message { get; private set; }Log content
Fast.Logging.StringLoggingPart.Level
Source · Targets: net8.0, net9.0, net10.0
public LogLevel Level { get; private set; } = LogLevel.Information;Log level
Fast.Logging.StringLoggingPart.Args
Source · Targets: net8.0, net9.0, net10.0
public object[] Args { get; private set; }Message formatting arguments
Fast.Logging.StringLoggingPart.EventId
Source · Targets: net8.0, net9.0, net10.0
public EventId? EventId { get; private set; }Event ID
Fast.Logging.StringLoggingPart.CategoryType
Source · Targets: net8.0, net9.0, net10.0
public Type CategoryType { get; private set; } = typeof(StringLogging);Log category type
Fast.Logging.StringLoggingPart.Exception
Source · Targets: net8.0, net9.0, net10.0
public Exception Exception { get; private set; }Exception object
Fast.Logging.StringLoggingPart.LoggerScoped
Source · Targets: net8.0, net9.0, net10.0
public IServiceProvider LoggerScoped { get; private set; }Scope containing the logging object
Fast.Logging.StringLoggingPart.LogContext
Source · Targets: net8.0, net9.0, net10.0
public LogContext LogContext { get; private set; }Logging context
Fast.Logging.StringLoggingPart
Source · Targets: net8.0, net9.0, net10.0
public sealed partial class StringLoggingPartPartial class for building string logs
Fast.Logging.StringLoggingPart.LogInformation
Source · Targets: net8.0, net9.0, net10.0
public void LogInformation()Information
Fast.Logging.StringLoggingPart.LogWarning
Source · Targets: net8.0, net9.0, net10.0
public void LogWarning()Warning
Fast.Logging.StringLoggingPart.LogError
Source · Targets: net8.0, net9.0, net10.0
public void LogError()Error
Fast.Logging.StringLoggingPart.LogDebug
Source · Targets: net8.0, net9.0, net10.0
public void LogDebug()Debug
Fast.Logging.StringLoggingPart.LogTrace
Source · Targets: net8.0, net9.0, net10.0
public void LogTrace()Trace
Fast.Logging.StringLoggingPart.LogCritical
Source · Targets: net8.0, net9.0, net10.0
public void LogCritical()Critical
Fast.Logging.StringLoggingPart.Log
Source · Targets: net8.0, net9.0, net10.0
public void Log()Writes a log using the current level, event, and exception settings
Fast.Logging.StringLoggingPart
Source · Targets: net8.0, net9.0, net10.0
public sealed partial class StringLoggingPartPartial class for building string logs
Fast.Logging.StringLoggingPart.SetMessage
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart SetMessage(string message)Sets the message
- Parameter
message: Message to record or return - Returns: Sets the message
Fast.Logging.StringLoggingPart.SetLevel
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart SetLevel(LogLevel level)Sets the log level
- Parameter
level: Log level - Returns: Sets the log level
Fast.Logging.StringLoggingPart.SetArgs
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart SetArgs(params object[] args)Sets message formatting arguments
- Parameter
args: Arguments used to format the message - Returns: Sets message formatting arguments
Fast.Logging.StringLoggingPart.SetEventId
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart SetEventId(EventId eventId)Sets the event ID
- Parameter
eventId: Logging event identifier - Returns: Sets the event ID
Fast.Logging.StringLoggingPart.SetCategory
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart SetCategory<TClass>()Sets the log category
- Type parameter
TClass: Type of the object to process - Returns: Sets the log category
Fast.Logging.StringLoggingPart.SetException
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart SetException(Exception exception)Sets the exception object
- Parameter
exception: Exception to handle - Returns: Sets the exception object
Fast.Logging.StringLoggingPart.SetLoggerScoped
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart SetLoggerScoped(IServiceProvider serviceProvider)Sets the logging service scope
- Parameter
serviceProvider: Service provider used for resolution;nulluses the current request or root provider - Returns: Sets the logging service scope
Fast.Logging.StringLoggingPart.ScopeContext
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart ScopeContext(IDictionary<object, object> properties)Configures the logging context
- Parameter
properties: Properties to write to the context - Returns: Logger and disposable handle used to end the scope
Fast.Logging.StringLoggingPart.ScopeContext
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart ScopeContext(Action<LogContext> configure)Configures the logging context
- Parameter
configure: Logging context configuration callback - Returns: Logger and disposable handle used to end the scope
Fast.Logging.StringLoggingPart.ScopeContext
Source · Targets: net8.0, net9.0, net10.0
public StringLoggingPart ScopeContext(LogContext context)Configures the logging context
- Parameter
context: Current logging context - Returns: Logger and disposable handle used to end the scope
Fast.Logging.LoggingSettingsOptions
Source · Targets: net8.0, net9.0, net10.0
[SuppressSniffer]
public class LoggingSettingsOptions : IPostConfigureLogging options
Fast.Logging.LoggingSettingsOptions.FileFormat
Source · Targets: net8.0, net9.0, net10.0
public string FileFormat { get; set; }File format string
Fast.Logging.LoggingSettingsOptions.FileSizeLimit
Source · Targets: net8.0, net9.0, net10.0
public int? FileSizeLimit { get; set; }File size limit in bytes
Fast.Logging.LoggingSettingsOptions.MiniLogLevel
Source · Targets: net8.0, net9.0, net10.0
public LogLevel? MiniLogLevel { get; set; }Minimum log level
Fast.Logging.LoggingSettingsOptions.EnableCritical
Source · Targets: net8.0, net9.0, net10.0
public bool? EnableCritical { get; set; }Enables LogLevel.Critical logs
Fast.Logging.LoggingSettingsOptions.PostConfigure
Source · Targets: net8.0, net9.0, net10.0
public void PostConfigure()Documentation is inherited from an interface or base class; consult that declaration.
