# ecs_elixir_core v1.1.0 - Table of Contents

> An Elixir library for generating logs in compliance with the Elastic Common Schema (ECS) standard.

## Pages

- [ECS Elixir Core](readme.md)

## Modules

- [EcsElixirCore.Application.EcsMiddleware.HandlerEcsRestConfig](EcsElixirCore.Application.EcsMiddleware.HandlerEcsRestConfig.md): Manages configuration for the ECS middleware.

- [EcsElixirCore.Application.EcsMiddleware.MiddlewareEcsConfig](EcsElixirCore.Application.EcsMiddleware.MiddlewareEcsConfig.md): Manages configuration for the ECS middleware.

- [EcsElixirCore.Application.EcsMiddleware.PlugHandlerConfig](EcsElixirCore.Application.EcsMiddleware.PlugHandlerConfig.md): GenServer that asynchronously dispatches ECS log commands to the Plug use case.

- [EcsElixirCore.Application.Features.BasicInfo.BasicInfoConfig](EcsElixirCore.Application.Features.BasicInfo.BasicInfoConfig.md): Provides configuration for request, response basic info visibility in logs.

- [EcsElixirCore.Application.Features.Masking.MaskingConfig](EcsElixirCore.Application.Features.Masking.MaskingConfig.md): Configuration for the masking feature.

- [EcsElixirCore.Application.Features.Request.RequestConfig](EcsElixirCore.Application.Features.Request.RequestConfig.md): Provides configuration for request visibility in logs.

- [EcsElixirCore.Application.Features.Response.ResponseConfig](EcsElixirCore.Application.Features.Response.ResponseConfig.md): Provides configuration for request visibility in logs.

- [EcsElixirCore.Application.Features.Sampling.SamplingConfig](EcsElixirCore.Application.Features.Sampling.SamplingConfig.md): Manages sampling feature configuration.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Model.CoreException](EcsElixirCore.Domain.Model.EcsMiddleware.Model.CoreException.md): Domain model for a validated and normalized exception before it becomes a log record.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Model.EcsPayload](EcsElixirCore.Domain.Model.EcsMiddleware.Model.EcsPayload.md): domain struct representing the normalized input to the ECS use case.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Model.LogRecord](EcsElixirCore.Domain.Model.EcsMiddleware.Model.LogRecord.md): ECS-compliant log record. Serialized to JSON and emitted by the infrastructure layer.
- [EcsElixirCore.Domain.Model.EcsMiddleware.Value.CoreExceptionInputValidator](EcsElixirCore.Domain.Model.EcsMiddleware.Value.CoreExceptionInputValidator.md): Validates field presence and types for a CoreException.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Value.CoreExceptionLevelValidator](EcsElixirCore.Domain.Model.EcsMiddleware.Value.CoreExceptionLevelValidator.md): Validates the `level` field for a CoreException.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Value.EcsBuildLogErrorConstant](EcsElixirCore.Domain.Model.EcsMiddleware.Value.EcsBuildLogErrorConstant.md): Error message constants for the ECS log build and execution process.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Value.EcsDefaultErrorConstant](EcsElixirCore.Domain.Model.EcsMiddleware.Value.EcsDefaultErrorConstant.md): Value object: constants and factory for the default ECS error response.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Value.EcsLogLevel](EcsElixirCore.Domain.Model.EcsMiddleware.Value.EcsLogLevel.md): Validator for ECS log levels.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Value.EcsLogLevelConstant](EcsElixirCore.Domain.Model.EcsMiddleware.Value.EcsLogLevelConstant.md): ECS log level constants.

- [EcsElixirCore.Domain.Model.EcsMiddleware.Value.LogRecordError](EcsElixirCore.Domain.Model.EcsMiddleware.Value.LogRecordError.md): Value object representing the error section of an ECS log record.

- [EcsElixirCore.Domain.Model.Features.Masking.Model.MaskingProperties](EcsElixirCore.Domain.Model.Features.Masking.Model.MaskingProperties.md): Represents one masking rule configuration.

- [EcsElixirCore.Domain.Model.Features.Masking.Value.MaskingPropertiesValidator](EcsElixirCore.Domain.Model.Features.Masking.Value.MaskingPropertiesValidator.md): Validates the structure and values of masking properties.

- [EcsElixirCore.Domain.Model.Features.Sampling.Model.SamplingRuleSet](EcsElixirCore.Domain.Model.Features.Sampling.Model.SamplingRuleSet.md): Parsed sampling ruleset. Provides parsing, building, and lookup of 20x and 40x rules.

- [EcsElixirCore.Domain.Model.Features.Sampling.Value.SamplingErrorCode](EcsElixirCore.Domain.Model.Features.Sampling.Value.SamplingErrorCode.md): Value object for deriving a 2-segment sampling error code from an error type string.

- [EcsElixirCore.Domain.Model.Features.Sampling.Value.SamplingRule](EcsElixirCore.Domain.Model.Features.Sampling.Value.SamplingRule.md): Value object representing a single sampling rule (show_count, skip_count, cycle).
- [EcsElixirCore.Domain.Model.Features.Sampling.Value.SamplingRuleValidator](EcsElixirCore.Domain.Model.Features.Sampling.Value.SamplingRuleValidator.md): Pure validation logic for sampling rule objects decoded from JSON.

- [EcsElixirCore.Domain.Shared.Common.Model.MessageId](EcsElixirCore.Domain.Shared.Common.Model.MessageId.md): Normalizes the message-id field from any known key variant.
- [EcsElixirCore.Domain.Shared.Common.Value.Command](EcsElixirCore.Domain.Shared.Common.Value.Command.md): Command object that travels from the entry point to the use case.

- [EcsElixirCore.Domain.Shared.Common.Value.ContextData](EcsElixirCore.Domain.Shared.Common.Value.ContextData.md): Execution context for an ECS Command.

- [EcsElixirCore.Domain.Shared.InternalLogging](EcsElixirCore.Domain.Shared.InternalLogging.md): Centralized internal logging for the ECS library.

- [EcsElixirCore.Domain.UseCase.EcsMiddleware.EcsAppPlugUseCase](EcsElixirCore.Domain.UseCase.EcsMiddleware.EcsAppPlugUseCase.md): Plug-specific use case for ECS response logging.

- [EcsElixirCore.Domain.UseCase.EcsMiddleware.EcsAppRestUseCase](EcsElixirCore.Domain.UseCase.EcsMiddleware.EcsAppRestUseCase.md): REST-API-specific use case for ECS logging.

- [EcsElixirCore.Domain.UseCase.EcsMiddleware.EcsCoreUseCase](EcsElixirCore.Domain.UseCase.EcsMiddleware.EcsCoreUseCase.md): Core use case for ECS logging.

- [EcsElixirCore.Domain.UseCase.Features.BasicInfoUseCase](EcsElixirCore.Domain.UseCase.Features.BasicInfoUseCase.md): Applies basic info visibility rules to log_record.

- [EcsElixirCore.Domain.UseCase.Features.MaskingUseCase](EcsElixirCore.Domain.UseCase.Features.MaskingUseCase.md): Applies masking rules to LogRecord attributes based on configuration.

- [EcsElixirCore.Domain.UseCase.Features.RequestErrorUseCase](EcsElixirCore.Domain.UseCase.Features.RequestErrorUseCase.md): Applies request visibility rules to log_record additionalInfo.

- [EcsElixirCore.Domain.UseCase.Features.RequestSuccessUseCase](EcsElixirCore.Domain.UseCase.Features.RequestSuccessUseCase.md): Applies request visibility rules to log_record additionalInfo.

- [EcsElixirCore.Domain.UseCase.Features.ResponseUseCase](EcsElixirCore.Domain.UseCase.Features.ResponseUseCase.md): Applies request/response visibility rules to log_record additionalInfo.

- [EcsElixirCore.Domain.UseCase.Features.SamplingUseCase](EcsElixirCore.Domain.UseCase.Features.SamplingUseCase.md): Decides whether a LogRecord should be printed or discarded based on sampling rules.
- [EcsElixirCore.Infra.DrivenAdapters.CmdLine.EcsMiddleware.CmdLineLoggerEcs](EcsElixirCore.Infra.DrivenAdapters.CmdLine.EcsMiddleware.CmdLineLoggerEcs.md): Command-line output adapter for ECS logs.
Implements TechToPrint — serializes a LogRecord to JSON and emits it via Logger.

- [EcsElixirCore.Infra.DrivenAdapters.EtsGenServer.Features.Sampling.Infra.EtsSamplingGenServer](EcsElixirCore.Infra.DrivenAdapters.EtsGenServer.Features.Sampling.Infra.EtsSamplingGenServer.md): ETS-backed atomic counter for sampling positions, owned by a GenServer.
- [EcsElixirCore.Infra.EntryPoints.PlugHandler.Application.HandlerEcsResponse](EcsElixirCore.Infra.EntryPoints.PlugHandler.Application.HandlerEcsResponse.md): Plug that logs the outgoing HTTP response using the ECS middleware.

- [EcsElixirCore.Infra.EntryPoints.PlugHandler.Domain.SuccessResponse](EcsElixirCore.Infra.EntryPoints.PlugHandler.Domain.SuccessResponse.md): Builds an ECS success payload from a Plug connection response.

- [EcsElixirCore.Infra.EntryPoints.RestApi.Application.HandlerEcsRest](EcsElixirCore.Infra.EntryPoints.RestApi.Application.HandlerEcsRest.md): REST API entry point — public API of the library.

- [EcsElixirCore.Infra.EntryPoints.RestApi.Domain.EcsResponse](EcsElixirCore.Infra.EntryPoints.RestApi.Domain.EcsResponse.md): Builds an error ECS log payload from an exception map and connection.

- [EcsElixirCore.Infra.EntryPoints.RestApi.Domain.SuccessLog](EcsElixirCore.Infra.EntryPoints.RestApi.Domain.SuccessLog.md): Builds a success ECS log payload from a connection and response.

- [EcsElixirCore.Supervisor](EcsElixirCore.Supervisor.md): Supervisor for the EcsElixirCore application.
This supervisor is responsible for starting and supervising the main components of the EcsElixirCore application.

