Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DB Connection information to initial output #335

Closed
rustprooflabs opened this issue Jun 1, 2023 · 1 comment · Fixed by #336
Closed

Add DB Connection information to initial output #335

rustprooflabs opened this issue Jun 1, 2023 · 1 comment · Fixed by #336
Labels
enhancement New feature or request
Milestone

Comments

@rustprooflabs
Copy link
Owner

rustprooflabs commented Jun 1, 2023

Details

Now that I'm using --force in development, I'd really a reassurance that I'm really waiting on a Dev connection and not accidentally a prod one.

This line explains it's an external connection (only time I really care):

2023-05-31 20:08:08,043:INFO:pgosm-flex:db:Using external database. Ensure the target database is setup properly with proper permissions.

Maybe extend the line with

... with proper permissions for user "<user>" on host "<host>:<port>" in database "<dbname>"
@rustprooflabs
Copy link
Owner Author

#336 adds the new log details when waiting on pg_isready, earlier than mentioned above. Putting the output here gives the user time to cancel the run. Putting the log later doesn't give the user any time to react.

External connection example with the lines before and after.

2023-06-02 19:48:01,536:INFO:pgosm-flex:db:Checking for Postgres service to be available
2023-06-02 19:48:01,536:INFO:pgosm-flex:db:Connecting to Postgres using role "pgosm_flex" on host  "172.16.0.170:5432"  in database "pgosm_dev"
2023-06-02 19:48:07,668:INFO:pgosm-flex:db:Postgres instance ready

Internal example (only the new line)

2023-06-02 19:56:43,147:INFO:pgosm-flex:db:Connecting to Postgres using role "postgres" on host  "localhost:5432"  in database "pgosm"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant