Reputation: 230366
I'm integrating a logger on an Express app, and have replaced all console.log
calls with our logger. Still stdout contains a line per request, and I can't find the place in our code that emits those.
1479433034910 INFO C:\work\Midburn\spark\app.js : Spark is starting...
1479433035437 INFO C:\work\Midburn\spark\app.js : Spark environment: NODE_ENV =
1479433035438 INFO C:\work\Midburn\spark\app.js : ------ Spark is running ------
GET /he/home 302 24.940 ms - 84
1479433049833 INFO C:\work\Midburn\spark\routes\main_routes.js : /he/home
GET /he/login?r=/he/home 200 353.463 ms - 2454
GET /stylesheets/style.css 304 2.857 ms - -
GET /images/flags/he.gif 304 1.039 ms - -
GET /images/flags/en.gif 304 0.486 ms - -
What is generating the lines that start with GET
?
Upvotes: 0
Views: 480
Reputation: 4391
In your Express setup somewhere you likely have this line:
app.use(morgan('dev'));
https://www.npmjs.com/package/morgan
HTTP request logger middleware for node.js
Upvotes: 2