Skip to content
Snippets Groups Projects
Commit e88f9410 authored by Cam Saül's avatar Cam Saül Committed by GitHub
Browse files

Merge pull request #5037 from metabase/disable-log-colors-and-emoji-by-default-in-windows

Disable log colors & emoji by default in Windows
parents 6e51cc3b 3f0e5b26
No related branches found
No related tags found
No related merge requests found
......@@ -5,32 +5,28 @@
[environ.core :as environ])
(:import clojure.lang.Keyword))
(def ^Boolean is-windows?
"Are we running on a Windows machine?"
(s/includes? (s/lower-case (System/getProperty "os.name")) "win"))
(def ^:private ^:const app-defaults
"Global application defaults"
{;; Database Configuration (general options? dburl?)
:mb-run-mode "prod"
:mb-db-type "h2"
;:mb-db-dbname "postgres"
;:mb-db-host "localhost"
;:mb-db-port "5432"
;:mb-db-user "metabase"
;:mb-db-pass "metabase"
:mb-db-file "metabase.db"
:mb-db-automigrate "true"
:mb-db-logging "true"
;; Embedded Jetty Webserver
;; check here for all available options:
;; https://github.com/ring-clojure/ring/blob/master/ring-jetty-adapter/src/ring/adapter/jetty.clj
:mb-jetty-port "3000"
:mb-jetty-join "true"
;; Other Application Settings
{:mb-run-mode "prod"
;; DB Settings
:mb-db-type "h2"
:mb-db-file "metabase.db"
:mb-db-automigrate "true"
:mb-db-logging "true"
;; Jetty Settings. Full list of options is available here: https://github.com/ring-clojure/ring/blob/master/ring-jetty-adapter/src/ring/adapter/jetty.clj
:mb-jetty-port "3000"
:mb-jetty-join "true"
;; other application settings
:mb-password-complexity "normal"
;:mb-password-length "8"
:mb-version-info-url "http://static.metabase.com/version-info.json"
:max-session-age "20160" ; session length in minutes (14 days)
:mb-colorize-logs "true"
:mb-emoji-in-logs "true"
:mb-qp-cache-backend "db"})
:mb-version-info-url "http://static.metabase.com/version-info.json"
:max-session-age "20160" ; session length in minutes (14 days)
:mb-colorize-logs (str (not is-windows?)) ; since PowerShell and cmd.exe don't support ANSI color escape codes or emoji,
:mb-emoji-in-logs (str (not is-windows?)) ; disable them by default when running on Windows. Otherwise they're enabled
:mb-qp-cache-backend "db"})
(defn config-str
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment