mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 18:36:12 +02:00
Add log entries for connection strings.
It helps a lot to debug what's happening, and it seems that we lost the information when cleaning up the log levels in recent efforts to unclutter the default output.
This commit is contained in:
parent
501762d2f5
commit
6b6c1c7d34
@ -265,6 +265,8 @@
|
||||
alter-schema
|
||||
materialize-views)
|
||||
"Export database source data and Import it into PostgreSQL"
|
||||
(log-message :log "Migrating from ~a" (source-db copy))
|
||||
(log-message :log "Migrating into ~a" (target-db copy))
|
||||
(let* ((*on-error-stop* on-error-stop)
|
||||
(copy-data (or data-only (not schema-only)))
|
||||
(create-ddl (or schema-only (not data-only)))
|
||||
|
||||
@ -112,7 +112,12 @@
|
||||
(defmethod print-object ((c db-connection) stream)
|
||||
(print-unreadable-object (c stream :type t :identity t)
|
||||
(with-slots (type name host port user) c
|
||||
(format stream "~a://~a@~a:~a/~a" type user host port name))))
|
||||
(let ((host (typecase host
|
||||
(cons (format nil "~a:~a"
|
||||
(string-downcase (car host))
|
||||
(cdr host)))
|
||||
(t host))))
|
||||
(format stream "~a://~a@~a:~a/~a" type user host port name)))))
|
||||
|
||||
(define-condition db-connection-error (connection-error)
|
||||
((host :initarg :host :reader connection-error-host)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user