diff options
| author | Michael Albinus | 2023-09-16 20:35:57 +0200 |
|---|---|---|
| committer | Michael Albinus | 2023-09-16 20:35:57 +0200 |
| commit | 9e736d254ae59ab60710a2ea07ae40d0ef10490a (patch) | |
| tree | f0574ce4129f83a12af97f707f0a8769ff417698 | |
| parent | f0f4cbfe8760bb04f9676c31020642acdcb03b16 (diff) | |
| download | emacs-9e736d254ae59ab60710a2ea07ae40d0ef10490a.tar.gz emacs-9e736d254ae59ab60710a2ea07ae40d0ef10490a.zip | |
Improve Tramp messages
* lisp/net/tramp-message.el (tramp-debug-message): Publish the
name of the debug file name.
| -rw-r--r-- | lisp/net/tramp-message.el | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el index 5b909b69ae3..8afc8d5fd87 100644 --- a/lisp/net/tramp-message.el +++ b/lisp/net/tramp-message.el | |||
| @@ -236,9 +236,12 @@ ARGUMENTS to actually emit the message (if applicable)." | |||
| 236 | tramp-trace-functions)) | 236 | tramp-trace-functions)) |
| 237 | (unless (get elt 'tramp-suppress-trace) | 237 | (unless (get elt 'tramp-suppress-trace) |
| 238 | (trace-function-background elt (tramp-trace-buffer-name vec))))) | 238 | (trace-function-background elt (tramp-trace-buffer-name vec))))) |
| 239 | ;; Delete debug file. | 239 | ;; Delete debug file. Announce its further existence. |
| 240 | (when (and tramp-debug-to-file (tramp-get-debug-file-name vec)) | 240 | (when (and tramp-debug-to-file (tramp-get-debug-file-name vec)) |
| 241 | (ignore-errors (delete-file (tramp-get-debug-file-name vec))))) | 241 | (ignore-errors (delete-file (tramp-get-debug-file-name vec))) |
| 242 | (let ((message-log-max t)) | ||
| 243 | (message | ||
| 244 | "Tramp debug file is %s" (tramp-get-debug-file-name vec))))) | ||
| 242 | (unless (bolp) | 245 | (unless (bolp) |
| 243 | (insert "\n")) | 246 | (insert "\n")) |
| 244 | ;; Timestamp. | 247 | ;; Timestamp. |
| @@ -301,18 +304,6 @@ applicable)." | |||
| 301 | (if tramp-debug-command-messages | 304 | (if tramp-debug-command-messages |
| 302 | (max tramp-verbose 6) tramp-verbose))) | 305 | (max tramp-verbose 6) tramp-verbose))) |
| 303 | (when (<= level tramp-verbose) | 306 | (when (<= level tramp-verbose) |
| 304 | ;; Display only when there is a minimum level, and the | ||
| 305 | ;; progress reporter doesn't suppress further messages. | ||
| 306 | (when (and (<= level 3) (null tramp-inhibit-progress-reporter)) | ||
| 307 | (apply #'message | ||
| 308 | (concat | ||
| 309 | (cond | ||
| 310 | ((= level 0) "") | ||
| 311 | ((= level 1) "") | ||
| 312 | ((= level 2) "Warning: ") | ||
| 313 | (t "Tramp: ")) | ||
| 314 | fmt-string) | ||
| 315 | arguments)) | ||
| 316 | ;; Log only when there is a minimum level. | 307 | ;; Log only when there is a minimum level. |
| 317 | (when (>= tramp-verbose 4) | 308 | (when (>= tramp-verbose 4) |
| 318 | (let ((tramp-verbose 0)) | 309 | (let ((tramp-verbose 0)) |
| @@ -338,7 +329,19 @@ applicable)." | |||
| 338 | (apply #'tramp-debug-message | 329 | (apply #'tramp-debug-message |
| 339 | vec-or-proc | 330 | vec-or-proc |
| 340 | (concat (format "(%d) # " level) fmt-string) | 331 | (concat (format "(%d) # " level) fmt-string) |
| 341 | arguments))))))) | 332 | arguments))) |
| 333 | ;; Display only when there is a minimum level, and the | ||
| 334 | ;; progress reporter doesn't suppress further messages. | ||
| 335 | (when (and (<= level 3) (null tramp-inhibit-progress-reporter)) | ||
| 336 | (apply #'message | ||
| 337 | (concat | ||
| 338 | (cond | ||
| 339 | ((= level 0) "") | ||
| 340 | ((= level 1) "") | ||
| 341 | ((= level 2) "Warning: ") | ||
| 342 | (t "Tramp: ")) | ||
| 343 | fmt-string) | ||
| 344 | arguments)))))) | ||
| 342 | 345 | ||
| 343 | ;; We cannot use the `declare' form for `tramp-suppress-trace' in | 346 | ;; We cannot use the `declare' form for `tramp-suppress-trace' in |
| 344 | ;; autoloaded functions, because the tramp-loaddefs.el generation | 347 | ;; autoloaded functions, because the tramp-loaddefs.el generation |