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

9 How to Customize Traces

All TRAMP messages are raised with a verbosity level. The verbosity level can be any number between 0 and 10. Only messages with a verbosity level less than or equal to tramp-verbose are displayed.

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)

When tramp-verbose is greater than or equal to 4, the messages are also written into a TRAMP debug buffer. This debug buffer is useful for analyzing problems; sending a TRAMP bug report should be done with tramp-verbose set to a verbosity level of at least 6 (see Bug Reports).

The debug buffer is in Outline Mode. That means, you can change the level of messages to be viewed. If you want, for example, see only messages up to verbosity level 5, you must enter C-u 6 C-c C-q.

TRAMP errors are handled internally in order to raise the verbosity level 1 messages. When you want to get a Lisp backtrace in case of an error, you need to set both

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

Sometimes, it might be even necessary to step through TRAMP function call traces. Such traces are enabled by the following code:

(require 'tramp)
(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 function call traces are inserted in the buffer *trace-output*. tramp-read-passwd and tramp-gw-basic-authentication shall be disabled when the function call traces are added to TRAMP, because both functions return password strings, which should not be distributed.

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