Structured logging convenience for TestcontainerEx.
Wraps Elixir's Logger with contextual metadata (container ID, image,
session, engine) so log lines are easy to filter and correlate.
Usage
# Inside container lifecycle code:
import TestcontainerEx.Log
log_info("Container started", container_id: id, image: img)
log_debug("Pulling image", image: img)
log_warning("Ryuk disabled", reason: :config)Configuration
All functions respect the standard :logger configuration.
The metadata keys :testcontainer_ex, :container_id, and :image
are automatically included when provided.
Summary
Functions
Logs a debug message with optional TestcontainerEx metadata.
Logs an error message with optional TestcontainerEx metadata.
Logs an informational message with optional TestcontainerEx metadata.
Logs a message at the given level with optional TestcontainerEx metadata.
Logs a warning message with optional TestcontainerEx metadata.
Functions
Logs a debug message with optional TestcontainerEx metadata.
Examples
log_debug("Pulling image", image: "redis:7")
Logs an error message with optional TestcontainerEx metadata.
Examples
log_error("Failed to start container", container_id: id, error: reason)
Logs an informational message with optional TestcontainerEx metadata.
Examples
log_info("Container started", container_id: "abc123", image: "postgres:15")
@spec log(Logger.level(), String.t(), keyword()) :: :ok
Logs a message at the given level with optional TestcontainerEx metadata.
Logs a warning message with optional TestcontainerEx metadata.
Examples
log_warning("Ryuk disabled — containers will not auto-clean", reason: :config)