Logs & Debugging
ScanPick logs to stdout. In production, redirect logs to a file or use your infrastructure’s log collection system.
Runtime Logs
Section titled “Runtime Logs”Single Binary
Section titled “Single Binary”./ScanPick.Api > scanpick.log 2>&1The log file captures all API activity including startup, database migrations, requests, and errors.
Docker Compose
Section titled “Docker Compose”# All servicesdocker compose logs
# API onlydocker compose logs api
# Follow (stream) API logsdocker compose logs -f apiFiltering Logs
Section titled “Filtering Logs”# Errors onlydocker compose logs api | grep -i error
# Specific worker activitydocker compose logs api | grep "worker-003"
# Database queriesdocker compose logs api | grep "Executing DbCommand"Development Mode
Section titled “Development Mode”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
export ASPNETCORE_ENVIRONMENT=Development./ScanPick.ApiLog Levels
Section titled “Log Levels”| Level | When to Use |
|---|---|
Error | Production monitoring — unexpected failures |
Warning | Production — non-critical issues |
Information | Default — normal operational events |
Debug | Troubleshooting — detailed flow information |
Trace | Development — very detailed diagnostics |
Log level is controlled via ASP.NET Core’s logging configuration.
The default level is Information.
Common Log Messages
Section titled “Common Log Messages”| Message | Meaning |
|---|---|
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: OK | API and database are operational |