A sanitation route-optimization job should record routine completion and also highlight API authentication failures. How should log levels be used?
Select an answer to reveal the explanation.
Short Explanation
Info is your daily 'routes built' checkmark, and error is the siren for bad API credentials. Don't scream success or whisper auth failures—match the level to the severity.
Full Explanation
Sanitation route-optimization jobs should record routine completion and also highlight API authentication failures using appropriate log severity levels. The correct approach is recording successful route-plan completion at info (or similar routine level) and API authentication failures at error (or higher), so dashboards, pages, and on-call workflows surface credential problems promptly. Logging every successful route plan at fatal severity floods alert channels and trains responders to ignore severity, while ignoring authentication failures hides outages. Using the same silent level for success and for credential failures collapses signal into noise or invisibility; failures must be distinguishable. Turning off error logs so authentication problems never appear in dashboards intentionally blinds operations to broken API credentials—an anti-pattern for municipal automation observability. Exam caveat: keep messages structured (job id, route batch, error class) without dumping full secrets; log that authentication failed and include the correlation id, not the password or token value. Operational check: complete the successful optimization run and confirm an info-level completion event; inject invalid credentials in the test environment and confirm an error-or-higher event reaches the sanitation operations dashboard within the expected alerting pipeline.