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,100 > (defcustom auth-source-debug nil > "Whether auth-source should log debug messages. > Also see `auth-source-hide-passwords'. > > Can be t, which means to use `message'. Be careful, your > authentication data will be in the clear (except for passwords, > which are always cleared).. > > Can also be a function, in which case the function should take > the same parameters 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." > :group 'auth-source > :version "23.1" ;; No Gnus > :type `boolean) > 139a138,150 > ;; (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 > (let ((logger (if (functionp auth-source-debug) > auth-source-debug > 'message))) > (when auth-source-debug > (apply logger msg)))) > 174,176c185,187 < (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,188c194,199 < (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,203c209,214 < (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)