emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/cpupower a18d913837 29/35: logging control


From: ELPA Syncer
Subject: [elpa] externals/cpupower a18d913837 29/35: logging control
Date: Thu, 5 May 2022 15:57:47 -0400 (EDT)

branch: externals/cpupower
commit a18d913837e4085619971e6c396cd8205f80d134
Author: smeister <smeister@awstruepower.com>
Commit: smeister <smeister@awstruepower.com>

    logging control
---
 cpupower.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/cpupower.el b/cpupower.el
index 2956494eb0..b0ce586dad 100644
--- a/cpupower.el
+++ b/cpupower.el
@@ -55,6 +55,13 @@ might need to enable this command for your user in 
/etc/sudoers"
   :type '(string)
   :group 'cpupower)
 
+(defcustom cpupower-enable-logging
+  nil
+  "When non-nil, cpupower.el will log all commands it runs to the
+messages buffer"
+  :type '(boolean)
+  :group 'cpupower)
+
 (defconst cpupower--compatible-versions
   '("5.4")
   "Versions of cpupower which cpupower.el can work with.")
@@ -108,7 +115,8 @@ cpus but currently it just finds _all_ governors."
   "Execute cpupower with SUBCOMMAND arguments return the output as a string."
   (with-temp-buffer
     (let ((command (format "%s %s" cpupower-cmd subcommand)))
-      (message "running: %s" command)
+      (when cpupower-enable-logging
+        (message "cpupower.el cmd: %s" command))
       (shell-command command (current-buffer))
       (buffer-string))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]