fix: clarify "listening" logs
It's not immediately clear on which port the API server is listening. Also it's not clear that the "pgrst" channel is for database notifications. Goes from: <timestamp>: Admin server listening on 0.0.0.0:3001 <timestamp>: Listening on 0.0.0.0:3000 <timestamp>: Listening for notifications on the "pgrst" channel To: <timestamp>: Admin server listening on 0.0.0.0:3001 <timestamp>: API server listening on 0.0.0.0:3000 <timestamp>: Listening for database notifications on the "pgrst" channel
This commit is contained in:
committed by
Steve Chavez
parent
bfbd033c6e
commit
87dddd66d2
@@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- #3693, Fix spread embedding errors when using the `count()` aggregate without a field - @laurenceisla
|
||||
+ Fixed `"column reference <col> is ambiguous"` error when selecting `?select=...table(col,count())`
|
||||
+ Fixed `"column <json_aggregate>.<alias> does not exist"` error when selecting `?select=...table(aias:count())`
|
||||
- #3727, Clarify "listening" logs - @steve-chavez
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ For diagnostic information about the server itself, PostgREST logs to ``stderr``
|
||||
06/May/2024:08:16:11 -0500: Starting PostgREST 12.1...
|
||||
06/May/2024:08:16:11 -0500: Attempting to connect to the database...
|
||||
06/May/2024:08:16:11 -0500: Successfully connected to PostgreSQL 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
|
||||
06/May/2024:08:16:11 -0500: Listening on port 3000
|
||||
06/May/2024:08:16:11 -0500: Listening for notifications on the "pgrst" channel
|
||||
06/May/2024:08:16:11 -0500: API server listening on port 3000
|
||||
06/May/2024:08:16:11 -0500: Listening for database notifications on the "pgrst" channel
|
||||
06/May/2024:08:16:11 -0500: Config reloaded
|
||||
06/May/2024:08:16:11 -0500: Schema cache queried in 3.8 milliseconds
|
||||
06/May/2024:08:16:11 -0500: Schema cache loaded 15 Relations, 8 Relationships, 8 Functions, 0 Domain Representations, 4 Media Type Handlers
|
||||
|
||||
@@ -65,9 +65,9 @@ observationMessage = \case
|
||||
AppStartObs ver ->
|
||||
"Starting PostgREST " <> T.decodeUtf8 ver <> "..."
|
||||
AppServerPortObs host port ->
|
||||
"Listening on " <> host <> ":" <> show port
|
||||
"API server listening on " <> host <> ":" <> show port
|
||||
AppServerUnixObs sock ->
|
||||
"Listening on unix socket " <> show sock
|
||||
"API server listening on unix socket " <> show sock
|
||||
DBConnectedObs ver ->
|
||||
"Successfully connected to " <> ver
|
||||
ExitUnsupportedPgVersion pgVer minPgVer ->
|
||||
@@ -95,15 +95,15 @@ observationMessage = \case
|
||||
QueryPgVersionError usageErr ->
|
||||
"Failed to query the PostgreSQL version. " <> jsonMessage usageErr
|
||||
DBListenStart channel -> do
|
||||
"Listening for notifications on the " <> show channel <> " channel"
|
||||
"Listening for database notifications on the " <> show channel <> " channel"
|
||||
DBListenFail channel listenErr ->
|
||||
"Failed listening for notifications on the " <> show channel <> " channel. " <> (
|
||||
"Failed listening for database notifications on the " <> show channel <> " channel. " <> (
|
||||
case listenErr of
|
||||
Left err -> show err
|
||||
Right err -> showListenerError err
|
||||
)
|
||||
DBListenRetry delay ->
|
||||
"Retrying listening for notifications in " <> (show delay::Text) <> " seconds..."
|
||||
"Retrying listening for database notifications in " <> (show delay::Text) <> " seconds..."
|
||||
DBListenerGotSCacheMsg channel ->
|
||||
"Received a schema cache reload message on the " <> show channel <> " channel"
|
||||
DBListenerGotConfigMsg channel ->
|
||||
|
||||
+1
-1
@@ -1268,7 +1268,7 @@ def test_log_postgrest_host_and_port(defaultenv):
|
||||
) as postgrest:
|
||||
output = postgrest.read_stdout(nlines=10)
|
||||
|
||||
assert f"Listening on {host}:{port}" in output[2] # output-sensitive
|
||||
assert f"API server listening on {host}:{port}" in output[2] # output-sensitive
|
||||
|
||||
|
||||
def test_succeed_w_role_having_superuser_settings(defaultenv):
|
||||
|
||||
Reference in New Issue
Block a user