Skip to content
Snippets Groups Projects
Commit 7e682001 authored by Thomas Bock's avatar Thomas Bock :speech_balloon:
Browse files

facility

parent 9811ce03
No related branches found
No related tags found
No related merge requests found
......@@ -19,3 +19,9 @@
* Valid values: `9009`, `55555`, ...
* Set Example: `export DEVHUB_IP=55555`
* Default value: `9009`
## `"DEVHUB_FACILITY"`
* Valid values: any string
* Set Example: `export DEVHUB_FACILITY="SE3"`
* Default value: none
logo.png

19.4 KiB | W: | H:

logo.png

6.24 KiB | W: | H:

logo.png
logo.png
logo.png
logo.png
  • 2-up
  • Swipe
  • Onion skin
{
{:log-context {:app-name "devhub"}
:mulog {:type :multi
;; send events to the stdout
:console {:type :console
......
......@@ -20,6 +20,11 @@
[:mulog :publishers]
(if (= e :off) [] [(get-in conf [:mulog e] d)]))))
(defn log-context [ conf]
(if-let [s (System/getenv "DEVHUB_FACILITY")]
(assoc-in conf [:log-context :facility] s)
conf))
(defn ip [conf]
(if-let [e (System/getenv "DEVHUB_IP")]
(assoc-in conf [:server :ip] e)
......@@ -36,4 +41,4 @@
(defn stub-mode [conf] (get-in conf [:stub :mode]))
(defn config [] (-> (get-conf) log-type ip port ))
(defn config [] (-> (get-conf) log-type log-context ip port ))
......@@ -4,6 +4,7 @@
(:require [compojure.route :as route]
[devhub.config :as c]
[devhub.utils :as u]
[clojure.pprint :as pprint]
[devhub.pp :as pp]
[devhub.pp-js :as js]
[devhub.pp-py :as py]
......@@ -132,9 +133,8 @@
middleware/wrap-json-response))
(defn init-log!
[{conf :mulog }]
(mu/set-global-context!
{:app-name "devhub" :version (:version (u/version))})
[{conf :mulog ctx :log-context}]
(mu/set-global-context! ctx)
(mu/start-publisher! conf))
(def server (atom nil))
......@@ -157,6 +157,6 @@
(reset! server (run-server #'app (:server conf)))))
(defn -main [& args]
(println (c/config))
(pprint/pprint (c/config))
(u/ascii-logo)
(start))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment