const winston = require('winston');
require('dotenv').config();
require('winston-syslog');

const logger = winston.createLogger({
	level: 'info',
	format: winston.format.combine(
		winston.format.timestamp(),
		winston.format.json(),
	),
	transports: [
		new winston.transports.Console({timestamp: true}),
        ...(
            process.env.PAPERTRAIL_PORT ?
            [
                new winston.transports.Syslog({
                    host: process.env.PAPERTRAIL_HOSTNAME,
                    port: parseInt(process.env.PAPERTRAIL_PORT),
                }),
            ] : []
        ),
    ],
});

module.exports = logger;

@@ -303,33 +303,18 @@
 %7D),%0A
-        ...(%0A            
+%09%09...(%0A%09%09%09
 proc
@@ -343,38 +343,17 @@
 T ?%0A
-            %5B%0A                
+%09%09%09%5B%0A%09%09%09%09
 new 
@@ -380,36 +380,21 @@
 yslog(%7B%0A
-                    
+%09%09%09%09%09
 host: pr
@@ -428,28 +428,13 @@
 ME,%0A
-                    
+%09%09%09%09%09
 port
@@ -478,62 +478,32 @@
 T),%0A
-                %7D),%0A            %5D : %5B%5D%0A        ),%0A    
+%09%09%09%09%7D),%0A%09%09%09%5D : %5B%5D%0A%09%09),%0A%09
 %5D,%0A%7D

indent tab