flaschenpost
Advanced tools
Comparing version 0.12.0 to 0.12.1
@@ -26,13 +26,20 @@ 'use strict'; | ||
const requestedFormatter = | ||
processenv('FLASCHENPOST_FORMATTER') || | ||
(process.stdout.isTTY ? 'human' : 'json'); | ||
let formatter; | ||
switch (processenv('FLASCHENPOST_FORMATTER')) { | ||
switch (requestedFormatter) { | ||
case 'gelf': | ||
formatter = new FormatterGelf(); | ||
break; | ||
case 'human': | ||
formatter = new FormatterHumanReadable(); | ||
break; | ||
case 'gelf': | ||
formatter = new FormatterGelf(); | ||
case 'json': | ||
formatter = new FormatterJson(); | ||
break; | ||
default: | ||
formatter = new FormatterJson(); | ||
throw new Error('Unsupported formatter.'); | ||
} | ||
@@ -39,0 +46,0 @@ |
{ | ||
"name": "flaschenpost", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"description": "flaschenpost is a logger for cloud-based applications.", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
133448
1509