Skip to content

Logs & Debugging

ScanPick logs to stdout. In production, redirect logs to a file or use your infrastructure’s log collection system.

Terminal window
./ScanPick.Api > scanpick.log 2>&1

The log file captures all API activity including startup, database migrations, requests, and errors.

Terminal window
# All services
docker compose logs
# API only
docker compose logs api
# Follow (stream) API logs
docker compose logs -f api
Terminal window
# Errors only
docker compose logs api | grep -i error
# Specific worker activity
docker compose logs api | grep "worker-003"
# Database queries
docker compose logs api | grep "Executing DbCommand"

Set ASPNETCORE_ENVIRONMENT=Development for:

  • Detailed error pages with stack traces
  • Scalar API explorer at /scalar/v1
  • More verbose logging
  • EF Core SQL query logging
Terminal window
export ASPNETCORE_ENVIRONMENT=Development
./ScanPick.Api
LevelWhen to Use
ErrorProduction monitoring — unexpected failures
WarningProduction — non-critical issues
InformationDefault — normal operational events
DebugTroubleshooting — detailed flow information
TraceDevelopment — very detailed diagnostics

Log level is controlled via ASP.NET Core’s logging configuration. The default level is Information.

MessageMeaning
Applying migrations...EF Core is updating the database schema
Seeding demo data...First-run data initialization
License validated: {status}License check result
PickTask {id} updated: {quantity}Scan processed successfully
WebSocket connected: {id}SignalR client connected
Health check: OKAPI and database are operational