-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogging.sld
More file actions
21 lines (19 loc) · 794 Bytes
/
logging.sld
File metadata and controls
21 lines (19 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
;; Copyright (c) 2020 by David Wilson, All Rights Reserved.
;; Substratic Engine - https://github.com/substratic/engine
;;
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at https://mozilla.org/MPL/2.0/.
(define-library (substratic engine logging)
(import (gambit))
(export log-value)
(begin
;; Logs a message and all of the values provided then returns
;; the first value in the values arguments. The additional
;; value arguments are only used for extra context in the
;; log statement.
(define (log-value message . values)
(println message)
(for-each (lambda (value) (pp value)) values)
(println "")
(car values))))