mirror of
https://github.com/penpot/penpot.git
synced 2025-07-18 12:27:11 +02:00
📎 Add logging to server repl namespace.
This commit is contained in:
parent
e1e825f350
commit
028e1d63a3
1 changed files with 10 additions and 6 deletions
|
@ -9,6 +9,7 @@
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.srepl.main]
|
[app.srepl.main]
|
||||||
|
[app.util.logging :as l]
|
||||||
[clojure.core.server :as ccs]
|
[clojure.core.server :as ccs]
|
||||||
[clojure.main :as cm]
|
[clojure.main :as cm]
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
|
@ -41,14 +42,17 @@
|
||||||
|
|
||||||
(defmethod ig/init-key ::server
|
(defmethod ig/init-key ::server
|
||||||
[_ {:keys [port host name] :as cfg}]
|
[_ {:keys [port host name] :as cfg}]
|
||||||
(ccs/start-server {:address host
|
(when (and port host name)
|
||||||
:port port
|
(l/info :msg "initializing server repl" :port port :host host :name name)
|
||||||
:name name
|
(ccs/start-server {:address host
|
||||||
:accept 'app.srepl/repl})
|
:port port
|
||||||
cfg)
|
:name name
|
||||||
|
:accept 'app.srepl/repl})
|
||||||
|
cfg))
|
||||||
|
|
||||||
(defmethod ig/halt-key! ::server
|
(defmethod ig/halt-key! ::server
|
||||||
[_ cfg]
|
[_ cfg]
|
||||||
(ccs/stop-server (:name cfg)))
|
(when cfg
|
||||||
|
(ccs/stop-server (:name cfg))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue