diff --git a/config/application.rb b/config/application.rb index 0c294ac06..2188891f5 100644 --- a/config/application.rb +++ b/config/application.rb @@ -69,6 +69,9 @@ module Fablab Rails.application.config.paths['app/views'] << path end + # disable ANSI color escape codes in active_record if NO_COLOR is defined. + config.colorize_logging = ENV['NO_COLOR'] ? false : true + FabManager.activate_plugins! config.after_initialize do diff --git a/doc/environment.md b/doc/environment.md index 831453685..63f1a21e0 100644 --- a/doc/environment.md +++ b/doc/environment.md @@ -269,6 +269,11 @@ See [Microsoft support](https://support.microsoft.com/en-us/kb/264372) for a lis If set to `true`, and the application in started into a staging environment, this will enable the Crowdin In-context translation layer for the front-end application. See [Crowdin documentation](https://support.crowdin.com/in-context-localization/) for more details about this. Accordingly, `RAILS_LOCALE` and `APP_LOCALE` must be configured to `zu`. + + + NO_COLOR + +If set to any value, this will set `config.colorize_logging` to `false`, disabling ANSI color codes when logging information. ## OpenLab settings