ExESDB.LoggingPublisher (ex_esdb v0.11.0)
Helper module for publishing structured logging events to the :ex_esdb_logging PubSub topic.
This module provides a clean API for components to publish logging events instead of using direct terminal output.
Summary
Functions
Publishes a logging event to the appropriate topic.
Convenience functions for common logging scenarios
Functions
Publishes a logging event to the appropriate topic.
Parameters
component: The component type (e.g., :emitter_pool, :emitter_worker, :emitter_system)event_type: The type of event (e.g., :startup, :shutdown, :action, :health, :error)store_id: The store identifiermessage: The log messagemetadata: Additional metadata (default: %{})
Examples
iex> LoggingPublisher.publish(:emitter_pool, :startup, :my_store, "Pool started", %{pool_size: 3})
:ok
iex> LoggingPublisher.publish(:emitter_worker, :action, :my_store, "Processing event", %{event_id: "123"})
:ok
Convenience functions for common logging scenarios