refactor(cli,lib): print levels & output redirection
This refactors how Doom captures and redirects its output (to stdout and stderr) into a more general with-output-to! macro, and: - Simplifies the "print level" system. The various doom-print-*-level variables have been removed. - Adds a new print level: notice, which will be the default level for all standard output (from print!, doom-print, prin[ct1], etc). - Adds a with-output-to! macro for capturing and redirecting output to multiple streams (without suppressing it from stdout). It can also be nested. - Changes the following about doom-print: - Default :format changed to nil (was t) - Default :level changed to t (was `doom-print-level`) - No longer no-ops if OUTPUT is only whitespace
This commit is contained in:
parent
6cac7b05b6
commit
b7bd27d22b
4 changed files with 226 additions and 170 deletions
|
@ -796,7 +796,7 @@ However, in batch mode, print to stdout instead of stderr."
|
|||
(setq msg (match-string 1 msg))))
|
||||
(and (string-match-p "^\\(Cloning\\|\\(Reb\\|B\\)uilding\\) " msg)
|
||||
(not (string-suffix-p "...done" msg))
|
||||
(doom-print (concat "> " msg)))))
|
||||
(doom-print (concat "> " msg) :format t))))
|
||||
|
||||
(defadvice! doom-cli--straight-ignore-gitconfig-a (fn &rest args)
|
||||
"Prevent user and system git configuration from interfering with git calls."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue