Summary
Observed two operational issues while running Olla behind frontend/edge services:
logging.output from config was not applied during startup because logger initialization happened before config load.
- Discovery cancellation during coordinated shutdown/restart (
context.Canceled) was treated as a regular discovery failure, which could incorrectly contribute to failure state.
Expected behavior
- Logger should honor configured
logging.output path/stream at startup.
- Discovery cancellation caused by lifecycle shutdown should be treated as expected and not counted as endpoint failure.
Proposed changes
- Load config before logger initialization in
main.go, and build logger settings from loaded config.
- Add explicit logger
OutputPath handling for absolute/relative output file targets.
- In discovery service, short-circuit
context.Canceled and skip failure-count increment/disable path for that case.
- Add test coverage proving cancellation does not increment failures or disable endpoint.
Files touched
main.go
internal/logger/logger.go
internal/adapter/discovery/service.go
internal/adapter/discovery/service_test.go
Summary
Observed two operational issues while running Olla behind frontend/edge services:
logging.outputfrom config was not applied during startup because logger initialization happened before config load.context.Canceled) was treated as a regular discovery failure, which could incorrectly contribute to failure state.Expected behavior
logging.outputpath/stream at startup.Proposed changes
main.go, and build logger settings from loaded config.OutputPathhandling for absolute/relative output file targets.context.Canceledand skip failure-count increment/disable path for that case.Files touched
main.gointernal/logger/logger.gointernal/adapter/discovery/service.gointernal/adapter/discovery/service_test.go