Archived
1
0

Fix loading within the CLI (#27)

* Fix loading within the CLI

* Remove app

* Remove promise handle

* Fix requested changes
This commit is contained in:
Kyle Carberry
2019-02-05 11:15:20 -06:00
parent a85af49c58
commit 797efe72fd
28 changed files with 477 additions and 105 deletions

View File

@ -272,8 +272,9 @@ export class Logger {
if (name) {
this.nameColor = hashStringToColor(name);
}
if (process.env.LOG_LEVEL) {
switch (process.env.LOG_LEVEL) {
const envLevel = typeof global !== "undefined" && typeof global.process !== "undefined" ? global.process.env.LOG_LEVEL : process.env.LOG_LEVEL;
if (envLevel) {
switch (envLevel) {
case "debug": this.level = Level.Debug; break;
case "info": this.level = Level.Info; break;
case "warn": this.level = Level.Warn; break;