From 2e78a31ac6ddc501919c2e420825e8f835e14d28 Mon Sep 17 00:00:00 2001 From: "robin.bygrave" Date: Sat, 13 Jun 2026 11:11:27 +1200 Subject: [PATCH] Change log level ERROR -> INFO for the RESOLVED FATAL: DataSource [" + name + "] is back log message From: Log.error("RESOLVED FATAL: DataSource [" + name + "] is back up!"); To: Log.info("Resolved Fatal: DataSource [{0}] is back up!", name); --- docs/guides/monitoring-pool-metrics.md | 8 ++++++-- .../java/io/ebean/datasource/pool/ConnectionPool.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/guides/monitoring-pool-metrics.md b/docs/guides/monitoring-pool-metrics.md index f01cf75..560e3ca 100644 --- a/docs/guides/monitoring-pool-metrics.md +++ b/docs/guides/monitoring-pool-metrics.md @@ -162,10 +162,14 @@ DataSourcePool pool = DataSourcePool.builder() The pool also logs these transitions itself: ``` -FATAL: DataSource [mypool] is down or has network error!!! -RESOLVED FATAL: DataSource [mypool] is back up! +FATAL: DataSource [mypool] is down or has network error!!! (logged at ERROR) +Resolved Fatal: DataSource [mypool] is back up! (logged at INFO) ``` +The "down" transition is logged at `ERROR` and the recovery at `INFO` — deliberately, so that +returning to a healthy state does not itself trigger ERROR-level alerting. If you want to alert on +recovery, do it via the `dataSourceUp` callback above rather than by matching the log line. + --- ## Borrow/return hooks with `DataSourcePoolListener` diff --git a/ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java b/ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java index a88e5eb..c146071 100644 --- a/ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java +++ b/ebean-datasource/src/main/java/io/ebean/datasource/pool/ConnectionPool.java @@ -358,7 +358,7 @@ private void notifyUp() { dataSourceUp.set(true); startHeartBeatIfStopped(); dataSourceDownReason = null; - Log.error("RESOLVED FATAL: DataSource [" + name + "] is back up!"); + Log.info("Resolved Fatal: DataSource [{0}] is back up!", name); if (notify != null) { notify.dataSourceUp(this); }