Skip to content

Commit

Permalink
Fixed the logger unused code - import logger helper
Browse files Browse the repository at this point in the history
  • Loading branch information
santoshshinde2012 committed Jul 7, 2021
1 parent e8d9335 commit 60672da
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/server.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
import * as http from 'http';
import { AddressInfo } from 'net';
import * as logger from 'winston';
import { TransformableInfo } from '../node_modules/logform';
import App from './App';
import Environment from './environments/environment';
import logger from './lib/logger';

const env: Environment = new Environment(process.env.NODE_ENV);
const app: App = new App(env);
let server: http.Server;

logger.configure({
level: 'debug',
transports: [
new logger.transports.Console({
format: logger.format.combine(
logger.format.colorize(),
logger.format.timestamp(),
logger.format.align(),
logger.format.printf((info: TransformableInfo) => `${info.timestamp} ${info.level}: ${info.message}`),
),
}),
],
});

function serverError(error: NodeJS.ErrnoException): void {
if (error.syscall !== 'listen') {
throw error;
Expand Down

0 comments on commit 60672da

Please sign in to comment.