Skip to content

CancellationLoggingBehavior

NexusLabs.Needlr.Logging

CancellationLoggingBehavior Enum

Controls what a Needlr source-generated logging method does when its exception argument is a cancellation (see NeedlrCancellationLogging).

public enum CancellationLoggingBehavior

Fields

Skip 0

Suppress the log entry entirely. This is the default — cancellation is normal control flow and is usually not worth logging.

Log 1

Log normally at the method's declared level, as if the exception were not a cancellation. This effectively turns the cancellation guard off.

Demote 2

Log the entry, but at the reduced level configured by DemotedLevel instead of the method's declared level.