# ecs_elixir_core v1.0.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.MiddlewareEcsConfig](EcsElixirCore.Application.EcsMiddleware.MiddlewareEcsConfig.md): Manages configuration for the ECS middleware.
- [EcsElixirCore.Application.Features.Masking.MaskingConfig](EcsElixirCore.Application.Features.Masking.MaskingConfig.md): Configuration for the masking feature.
- [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.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.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.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.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.

