Skip to content

Logging

Weixian edited this page May 27, 2026 · 1 revision

Logging in Layered and Onion Architecture

API layer logs:

  • request received
  • correlation ID / trace ID
  • authenticated user / tenant
  • response status
  • globally caught unhandled exception

Application layer logs:

  • use case started
  • important decisions or branches
  • use case completed
  • business failure that matters operationally

Domain layer logs:

  • generally no logging
  • maybe only in rare cases if your domain services are acting like transaction scripts and you really need observability
  • even then, keep it minimal

Infrastructure layer logs:

  • external calls failed
  • DB retries / timeouts
  • queue publish failures
  • HTTP client failures
  • adapter-specific technical details
  1. Agile Delivery
    1. Product Requirement Template
    2. Documenting Product Requirements
    3. Estimation & Sizing
  2. DevOps
    1. Gitlab Flow with Release Branches
    2. DevOps Pipelines
  3. Software Architecture Design
    1. Agent Engineering
    2. Logging
  4. Tech Stack
  5. Testing & Quality
  6. Observability & Operations

Clone this wiki locally