Next: , Previous: , Up: Top   [Contents][Index]

9 How to Customize Traces

TRAMP messages are raised with verbosity levels ranging from 0 to 10. TRAMP does not display all messages; only those with a verbosity level less than or equal to tramp-verbose.

The verbosity levels are

 0 silent (no TRAMP messages at all)
 1 errors
 2 warnings
 3 connection to remote hosts (default verbosity)
 4 activities
 5 internal
 6 sent and received strings
 7 file caching
 8 connection properties
 9 test commands
10 traces (huge)

With tramp-verbose greater than or equal to 4, messages are also written to a TRAMP debug buffer. Such debug buffers are essential to bug and problem analyses. For TRAMP bug reports, set the tramp-verbose level to 6 (see Bug Reports).

The debug buffer is in Outline Mode. In this buffer, messages can be filtered by their level. To see messages up to verbosity level 5, enter C-u 6 C-c C-q.

TRAMP handles errors internally. But to get a Lisp backtrace, both the error and the signal have to be set as follows:

(setq debug-on-error t
      debug-on-signal t)

To enable stepping through TRAMP function call traces, they have to be specifically enabled as shown in this code:

(require 'trace)
(dolist (elt (all-completions "tramp-" obarray 'functionp))
  (trace-function-background (intern elt)))
(untrace-function 'tramp-read-passwd)
(untrace-function 'tramp-gw-basic-authentication)

The buffer *trace-output* contains the output from the function call traces. Disable tramp-read-passwd and tramp-gw-basic-authentication to stop password strings from being written to *trace-output*.