Feature flags

You can change certain behaviour of the software at runtime, even after you configure Seq. You’ll have to use:

seqlog.feature_flags.enable_feature(feature: FeatureFlag)[source]

Enable a feature.

Parameters

feature (FeatureFlag) – A FeatureFlag value representing the feature to enable.

seqlog.feature_flags.disable_feature(feature: FeatureFlag)[source]

Disable a feature.

Parameters

feature (FeatureFlag) – A FeatureFlag value representing the feature to disable.

seqlog.feature_flags.configure_feature(feature: FeatureFlag, enable: Optional[bool])[source]

Enable or disable a feature.

Parameters
  • feature (FeatureFlag) – A FeatureFlag value representing the feature to configure. If you pass None, it won’t get changed.

  • enableTrue, to enable the feature; False to disable it.

class seqlog.feature_flags.FeatureFlag(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Well-known feature flags.

EXTRA_PROPERTIES = 1

Support passing of additional properties to log via the extra argument?

IGNORE_SEQ_SUBMISSION_ERRORS = 3

Ignore errors encountered while sending log records to Seq?

STACK_INFO = 2

Support attaching of stack-trace information (if available) to log records?

USE_CLEF = 4

Use more modern API to submit log entries

An example to disable ignoring of submission errors for Seq failures would look like this:

from seqlog.feature_flags import disable_feature, FeatureFlag

disable_feature(FeatureFlag.IGNORE_SEQ_SUBMISSION_ERRORS)