gwl-devel
[Top][All Lists]
Advanced

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

[PATCH] gwl/ui: Check for log-events configuration


From: Olivier Dion
Subject: [PATCH] gwl/ui: Check for log-events configuration
Date: Fri, 3 Jun 2022 14:32:03 -0400

Some GWL sub-commands such as `graph' do not accept a log event configuration.
This results in returning `#f' from `(%config 'log-events)'

Fix this by checking that 'log-events was configured.
---
 gwl/ui.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gwl/ui.scm b/gwl/ui.scm
index 35bd127..92cf451 100644
--- a/gwl/ui.scm
+++ b/gwl/ui.scm
@@ -65,8 +65,10 @@
 
 (define (log-event type . message)
   (define print?
-    (or (member 'all (%config 'log-events))
-        (member type (%config 'log-events))))
+    (let ((log-events (%config 'log-events)))
+      (and log-events
+           (or (member 'all (%config 'log-events))
+               (member type (%config 'log-events))))))
   (when print?
     (case type
       ((error)
-- 
2.36.1




reply via email to

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