hecate_plugin_logger (hecate_sdk v0.6.2)

View Source

JSON log formatter for OTP logger.

Produces one JSON line per log event, suitable for journald and machine parsing. Uses the OTP 27 json module.

Output example: {"ts":"2026-03-15T10:30:00.123456Z","level":"info", "msg":"Store ready","plugin":"martha","pid":"pid"}

Configure in sys.config: {kernel, [{logger, [{handler, default, logger_std_h, #{ formatter => {hecate_plugin_logger, #{}} }}]}]}

Summary

Functions

Validate formatter config. Accepts any map.

Format a log event as a single JSON line.

Functions

check_config(Config)

-spec check_config(logger:formatter_config()) -> ok | {error, term()}.

Validate formatter config. Accepts any map.

format(_, Config)

Format a log event as a single JSON line.