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); }