T13.4 follow-up: make the sync's log lines visible under gunicorn (D18)
Nothing configures Python logging and gunicorn only configures its own loggers, so INFO lines from wpsuite.* were dropped: with the production launch command a healthy start printed no Okta lines, and an operator could not tell the sync was off from on-and-quiet. okta_sync's logger now has its own stderr handler, only when the root logger has none. Verified with real gunicorn, 2 workers, with and without a token. Other modules' output is unchanged.
This commit is contained in:
@@ -242,6 +242,17 @@ network change. The host firewall must allow https to the Okta org.
|
||||
total (`TOTAL_DEADLINE_SECONDS`), which is what lets the scheduler promise no
|
||||
overlap. Tested in `tests/okta_sync_check.py` section 8.
|
||||
|
||||
**T13.4 follow-up, 2026-10-16:** the sync's INFO log lines did not appear in
|
||||
`docker compose logs api`. Nothing in the app configures Python logging, and
|
||||
gunicorn configures only its own loggers, so INFO from any `wpsuite.*` logger is
|
||||
dropped. The T13.4 check booted the app in-process with logging switched on,
|
||||
which hid it. With the exact Dockerfile launch (2 gunicorn workers), a healthy
|
||||
start printed zero Okta lines. `okta_sync.py` now gives its own logger one stderr
|
||||
handler (only when the root logger has none). Re-run with the real gunicorn
|
||||
command: `configured` and `scheduled` (or `DISABLED`) now print once per worker.
|
||||
No other module's output changed. App-wide logging stays a separate question
|
||||
(BL-028 is the same family).
|
||||
|
||||
### T13.5 — D18: admin visibility
|
||||
|
||||
- **Items:** `D18`
|
||||
|
||||
Reference in New Issue
Block a user