mirror of https://codeberg.org/glenneth/stash.git
Added a logging function
This commit is contained in:
parent
5950762aec
commit
ca71cf5fd3
|
|
@ -0,0 +1 @@
|
|||
Symlink created: /home/glenn/stash/test -> /home/glenn/.config/alacritty/test
|
||||
|
|
@ -142,9 +142,15 @@
|
|||
(eqv? (stat:type stat) 'symlink)))
|
||||
|
||||
(define (log-action message)
|
||||
(with-output-to-file "guile-stash.log"
|
||||
(lambda () (display message) (newline))
|
||||
#:append #t))
|
||||
(let ((log-port (open-file "guile-stash.log" "a"))) ;; Open file in append mode
|
||||
(display message log-port)
|
||||
(newline log-port)
|
||||
(close-port log-port))) ;; Close the port after writing
|
||||
|
||||
;; (define (log-action message)
|
||||
;; (with-output-to-file "guile-stash.log"
|
||||
;; (lambda () (display message) (newline))
|
||||
;; #:append #t))
|
||||
|
||||
;; Helper function to build target symlink path
|
||||
(define (build-target-path source target)
|
||||
|
|
|
|||
Loading…
Reference in New Issue