Index: auth-source.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/auth-source.el,v retrieving revision 7.16 diff -r7.16 auth-source.el 102a77,101 > (defcustom auth-source-debug nil > "Whether auth-source should log debug messages. > Also see `auth-source-hide-passwords'. > > If the value is nil, debug messages are not logged. > If the value is t, debug messages are logged with `message'. > In that case, your authentication data will be in the > clear (except for passwords, which are always stripped out). > If the value is a function, debug messages are logged by calling > that function using the same arguments as `message'." > :group 'auth-source > :version "23.1" ;; No Gnus > :type `(choice > :tag "auth-source debugging mode" > (const :tag "Log using `message' to the *Messages* buffer" t) > (function :tag "Function that takes arguments like `message'") > (const :tag "Don't log anything" nil))) > > (defcustom auth-source-hide-passwords t > "Whether auth-source should hide passwords in log messages. > Only relevant if auth-source-debug is not nil." > :group 'auth-source > :version "23.1" ;; No Gnus > :type `boolean) > 139a139,151 > ;; (let ((auth-source-debug 'debug)) (auth-source-debug "hello")) > ;; (let ((auth-source-debug t)) (auth-source-debug "hello")) > ;; (let ((auth-source-debug nil)) (auth-source-debug "hello")) > (defun auth-source-do-debug (&rest msg) > ;; set logger to either the function in auth-source-debug or 'message > ;; note that it will be 'message if auth-source-debug is nil, so > ;; we also check the value > (when auth-source-debug > (let ((logger (if (functionp auth-source-debug) > auth-source-debug > 'message))) > (apply logger msg)))) > 174,176c186,188 < (gnus-message 9 < "auth-source-user-or-password: get %s for %s (%s)" < mode host protocol) --- > (auth-source-do-debug > "auth-source-user-or-password: get %s for %s (%s)" > mode host protocol) 183,188c195,200 < (gnus-message 9 < "auth-source-user-or-password: cached %s=%s for %s (%s)" < mode < ;; don't show the password < (if (member "password" mode) "SECRET" found) < host protocol) --- > (auth-source-do-debug > "auth-source-user-or-password: cached %s=%s for %s (%s)" > mode > ;; don't show the password > (if (and (member "password" mode) auth-source-hide-passwords) "SECRET" found) > host protocol) 198,203c210,215 < (gnus-message 9 < "auth-source-user-or-password: found %s=%s for %s (%s)" < mode < ;; don't show the password < (if (member "password" mode) "SECRET" found) < host protocol) --- > (auth-source-do-debug > "auth-source-user-or-password: found %s=%s for %s (%s)" > mode > ;; don't show the password > (if (and (member "password" mode) auth-source-hide-passwords) "SECRET" found) > host protocol)