Skip to content

Commit 187ce4c

Browse files
committed
output request log to stdout
1 parent a1b9ec0 commit 187ce4c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

config/default.json

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"cache": {
1919
"timeout": 600
2020
},
21-
"accessLogPath": "access.log",
2221
"port": 8085,
2322
"consumer": {
2423
"timeoutMs": 300000,

server.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ var express = require('express'),
66
logger = log.logger,
77

88
fs = require('fs'),
9-
morgan = require('morgan'),
10-
accessLogStream = fs.createWriteStream(__dirname + '/' + config.accessLogPath, {flags: 'a'});
9+
morgan = require('morgan');
1110

1211
logger.info('Starting application...');
1312

1413
logger.info({ kafka: config.kafka }, 'Config.');
1514

16-
app.use(morgan('combined', { stream: accessLogStream }));
15+
app.use(morgan('combined'));
1716

1817
app.use(function(req, res, next) {
1918
var request = {

0 commit comments

Comments
 (0)