diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-08 16:58:14 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-08 16:58:14 -0600 |
| commit | c47f1d42abbb25af583384a3cb0ca17e8bcd61df (patch) | |
| tree | 9eeec18a71587ce8806535858b78e6cf0e300575 /wttrin-debug.el | |
| parent | b6761ed66012fcf3e98aa252582aaf03b2b85c12 (diff) | |
refactor: debug: route all debug output to debug log instead of Messages
- Remove (message ...) call from wttrin--debug-log function
- Replace 9 debug message calls in wttrin.el with wttrin--debug-log
- All debug output now goes to debug log for review with M-x wttrin-debug-show-log
- User-facing error messages preserved (network errors, processing errors)
- Updated docstring to clarify messages are stored for later review
Diffstat (limited to 'wttrin-debug.el')
| -rw-r--r-- | wttrin-debug.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wttrin-debug.el b/wttrin-debug.el index dd08a5a..a0576a4 100644 --- a/wttrin-debug.el +++ b/wttrin-debug.el @@ -112,12 +112,12 @@ It creates the *wttrin-mode-debug* buffer with diagnostic information." (defun wttrin--debug-log (format-string &rest args) "Log a debug message if wttrin-debug is enabled. -FORMAT-STRING and ARGS are passed to `format'." +FORMAT-STRING and ARGS are passed to `format'. +Messages are stored in `wttrin--debug-log' for later review." (when wttrin-debug (let ((msg (apply #'format format-string args)) (timestamp (format-time-string "%H:%M:%S.%3N"))) - (push (cons timestamp msg) wttrin--debug-log) - (message "[wttrin-debug %s] %s" timestamp msg)))) + (push (cons timestamp msg) wttrin--debug-log)))) ;;;###autoload (defun wttrin-debug-clear-log () |
