Skip to content

Configure logging transports and flush strategy for non-dev #6

@Flussen

Description

@Flussen

Context

LoggerService supports transports and levels, but production-safe defaults (file/remote transport, flushing, etc.) are not clearly defined. There is a risk of losing logs in non-dev environments or flooding the console.

Goal

Provide a sane default logging configuration for non-dev environments and ensure logs are flushed reliably, especially around shutdown.

Tasks

  • Define recommended transports for:
    • Development (console, verbose).
    • Production (file or remote endpoint, structured logs).
  • Add configuration options to select transports by environment.
  • Implement a simple "flush" mechanism on shutdown / onResourceStop to:
    • Ensure buffered logs are written before exit.
  • Keep the existing log field conventions (event, playerId, handler, stack) and consider adding traceId/requestId support.

Acceptance Criteria

  • Non-dev environments write logs to a persistent target by default.
  • Stopping the resource does not lose buffered logs.
  • Logging configuration is documented for users of the framework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions