Plugin Configuration
This guide explains configuration-driven plugin wiring.
Selecting Plugins
Configure plugins via
Settings.core.*lists:core.sinks: sink names (default: env-driven fallback →http→rotating_file→stdout_json)core.enrichers: defaultruntime_info,context_varscore.redactors: empty disables; legacyredactors_orderhonored when empty and redactors enabledcore.processors: optional processorscore.filters: optional filters that run before enrichers
Names accept hyphens or underscores; they are normalized internally (
field-mask==field_mask). Built-ins register both forms.
Per-Plugin Configuration
Nested config blocks map to plugin names. Examples (env or code):
sink_config.rotating_file: directory, rotation, retention, compressionsink_config.http: endpoint, headers, retry, timeoutsink_config.webhook: endpoint, secret, headers, retry, timeoutsink_config.loki: url, labels, label_keys, batching, auth, circuit breakersink_config.cloudwatch: log group/stream, region, batching, retries, circuit breakerredactor_config.field_mask: fields, mask string, guardrailsredactor_config.regex_mask: patterns, mask string, guardrailsredactor_config.url_credentials: max string lengthprocessor_config.zero_copy: reserved for zero_copy options; third-party configs viaprocessor_config.extraprocessor_config.size_guard:max_bytes,action, andpreserve_fieldsfor the size_guard processorfilter_config.level/sampling/adaptive_sampling/trace_sampling/first_occurrence/rate_limit: built-in filters; third-party configs viafilter_config.extraThird-party plugins use
extramaps (sink_config.extra,enricher_config.extra,redactor_config.extra,processor_config.extra) with arbitrary keys.
Environment Examples
# Multiple sinks
FAPILOG_CORE__SINKS='["stdout_json","rotating_file"]'
FAPILOG_SINK_CONFIG__ROTATING_FILE__DIRECTORY="/var/log/app"
# Disable enrichers
FAPILOG_CORE__ENRICHERS='[]'
# Processors with config
FAPILOG_CORE__PROCESSORS='["gzip"]'
FAPILOG_PROCESSOR_CONFIG__EXTRA__GZIP='{\"level\":4}'
# Redactors via legacy order (still supported)
FAPILOG_CORE__ENABLE_REDACTORS=true
FAPILOG_CORE__REDACTORS_ORDER='["field-mask","regex-mask"]'
Loader Behavior
Built-ins register in the loader registry with aliases; third-party plugins discovered via entry points (
fapilog.sinks,fapilog.enrichers,fapilog.redactors,fapilog.processors).core.log_levelnow gates events via an implicitlevelfilter when no explicitcore.filtersare configured (set toDEBUGto allow everything).Allow/deny lists live under
Settings.pluginsand are respected for every plugin load.Missing or failing plugins emit diagnostics and are skipped; logging continues with remaining plugins.
Integrity Wrapping
Integrity plugins (e.g.,
fapilog-tamper) are applied per sink: each sink is wrapped individually for independent hash chains/manifests.Optional integrity enricher from the plugin is appended when provided.
[event] → enrichers → redactors → sink A (wrapped) && sink B (wrapped)
This per-sink approach keeps verification isolated and avoids a multiplexer becoming a single point of failure for integrity state.