# Production Serilog Configuration
# Logging behavior adapts automatically based on deployment environment:
#
# Container Deployments (Docker/Kubernetes):
#   - Logs are formatted as Compact JSON Lines for structured log aggregation
#   - Output goes to stdout (captured by Docker/Kubernetes logging drivers)
#   - Compatible with ELK, Loki, EFK, and other log aggregation systems
#   - No log files are created in the container
#
# Non-Container Deployments:
#   - Logs are written ONLY to rolling files in logs/ directory
#   - NO console output to reduce noise in production
#   - Hourly rotation with 7-day retention (168 files)
#   - Automatic cleanup of old log files
Serilog:
  # Production log level - Information for normal operations
  # Change to Warning for reduced logging volume
  MinimumLevel:
    Default: Information

    # Namespace-specific overrides for production
    Override:
      Microsoft.EntityFrameworkCore: Warning
      Microsoft: Warning
      Orleans: Warning
      System: Warning
      Volo: Warning

  # Note: Sink configuration is handled programmatically in Program.cs
  # Detection logic:
  #   1. Container environment → JSONL to stdout
  #   2. Non-container environment → File only
  #
  # To override log retention for non-container deployments:
  # Edit Program.cs: retainedFileCountLimit parameter
  #   - 168 files = 7 days (default)
  #   - 336 files = 14 days
  #   - 720 files = 30 days

# Development License Configuration (only used in Debug builds)
License:
  PrimaryServer:
    # Local Development: Points to local Keygen CE service running in Docker
    # The service runs as 'keygen-web' container on port 3000 (mapped to 38000 on host)
    # Internal Docker network: http://keygen-web:3000
    # Host access (for non-container scenarios): http://localhost:38000
    Endpoint: "https://api.keygen.sh"
    # AccountId must match KEYGEN_ACCOUNT_ID in docker-compose.yml / .env
    AccountId: "9c5262cf-b569-44af-850e-97bc07c196cd"
    ProductId: "2c73c847-1077-44e6-afeb-651d5e7eb005"
    TimeoutSeconds: 30
  # License Activation Configuration
  Activation:
    AutoActivateOnStartup: true  # Set to true to automatically activate license on startup
    LicenseKey: "D76B5C-EC0A70-AEA453-BC9414-0A198D-V3"
    UserId: ""  # Optional: User ID for license activation
    RequireValidLicense: false  # Set to true to prevent app startup without valid license
  SignatureVerification:
    Enabled: true
    PublicKey: "b99b53d42ab126e54a9dbf7fee3a4f7089a205bf88ec211a0bb15319e6cc3f65"
    ToleranceSeconds: 300
    StrictMode: true
