moleculerjs / moleculer-web

:earth_africa: Official API Gateway service for Moleculer framework
http://moleculer.services/docs/moleculer-web.html
MIT License
291 stars 118 forks source link

Need an option to disable colors in log. #213

Closed h0x91b-wix closed 3 years ago

h0x91b-wix commented 3 years ago

https://github.com/moleculerjs/moleculer-web/blob/ad0686a76c8b0e60b1c9a03b9a35f5c4fd31eaf4/src/index.js#L941-L942

On production, I am using a log as JSONL, so in my case, no terminal colors should be generated

ero-app-http         | msg: "<= \e[32m\e[1m200\e[39m\e[22m POST \e[1m/keycloak/spanner/helloWorld\e[22m
ero-app-http         |   \e[31m[+1.040 s]\e[39m"
h0x91b-wix commented 3 years ago

Actually solved it by adding ENV var FORCE_COLOR=0, thanks to this PR https://github.com/moleculerjs/moleculer-web/pull/212