mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 19:06:11 +02:00
Fix handling --client-min-messages and --log-min-messages.
Should help with issue #67 by allowing --client-min-messages to effectively control entering the debugger in case of unhandled conditions, etc. Contrary to the discussion, in this patch --log-min-messages has no impact on the behavior of the console and interactive behaviors.
This commit is contained in:
parent
89d1ab460d
commit
e93ba8b887
@ -129,6 +129,19 @@
|
||||
(let ((*self-upgraded-already* t))
|
||||
(main argv))))
|
||||
|
||||
;; parse the log thresholds
|
||||
(setf *log-min-messages*
|
||||
(log-threshold log-min-messages
|
||||
:quiet quiet :verbose verbose :debug debug)
|
||||
|
||||
*client-min-messages*
|
||||
(log-threshold client-min-messages
|
||||
:quiet quiet :verbose verbose :debug debug)
|
||||
|
||||
verbose (member *client-min-messages* '(:info :debug :data))
|
||||
debug (member *client-min-messages* '(:debug :data))
|
||||
quiet (and (not verbose) (not debug)))
|
||||
|
||||
;; First care about the root directory where pgloader is supposed to
|
||||
;; output its data logs and reject files
|
||||
(let ((root-dir-truename (probe-file root-dir)))
|
||||
@ -177,13 +190,7 @@
|
||||
;; Now process the arguments
|
||||
(when arguments
|
||||
;; Start the logs system
|
||||
(let ((*log-filename* (log-file-name logfile))
|
||||
(*log-min-messages*
|
||||
(log-threshold log-min-messages
|
||||
:quiet quiet :verbose verbose :debug debug))
|
||||
(*client-min-messages*
|
||||
(log-threshold client-min-messages
|
||||
:quiet quiet :verbose verbose :debug debug)))
|
||||
(let ((*log-filename* (log-file-name logfile)))
|
||||
|
||||
(with-monitor ()
|
||||
;; tell the user where to look for interesting things
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user