Click or drag to resize
ILogLog Method
Log a message the specified log level.

Namespace: Hangfire.Logging
Assembly: Hangfire.Core (in Hangfire.Core.dll) Version: 1.5.0.0
Syntax
bool Log(
	LogLevel logLevel,
	Func<string> messageFunc,
	Exception exception = null
)

Parameters

logLevel
Type: Hangfire.LoggingLogLevel
The log level.
messageFunc
Type: SystemFuncString
The message function.
exception (Optional)
Type: SystemException
An optional exception.

Return Value

Type: Boolean
true if the message was logged. Otherwise false.
Remarks
Note to implementers: the message func should not be called if the loglevel is not enabled so as not to incur performance penalties. To check IsEnabled call Log with only LogLevel and check the return value, no event will be written
See Also