Skip to content

Commit

Permalink
change jsonrpc log
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Dec 10, 2023
1 parent 84f118e commit a4e3a9f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontends/jsonrpc/utils.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
:with-error-handler))
(in-package :lem-jsonrpc/utils)

(defvar *log-filename* (merge-pathnames "logs/jsonrpc.log" (lem:lem-home)))

(defun pdebug (fmt &rest args)
(with-open-file (out "~/lem-jsonrpc.log" :direction :output :if-exists :append :if-does-not-exist :create)
(apply #'format out fmt args)
(terpri out)))
(when *log-filename*
(ensure-directories-exist *log-filename*)
(with-open-file (out *log-filename* :direction :output :if-exists :append :if-does-not-exist :create)
(apply #'format out fmt args)
(terpri out))))

(defun hash (&rest args)
(alexandria:plist-hash-table args :test #'equal))
Expand Down

0 comments on commit a4e3a9f

Please sign in to comment.