Update:
Apologies for the confusion, I have realized that I needed to move the app.use(express.logger('dev')); higher up in the program. This adjustment has resulted in logging every GET and POST request successfully.
Express server now listening on port 3000
GET /raw 200 13ms
GET /data 304 17ms
GET /stylesheets/style.css 304 3ms
GET / 304 2ms
GET /stylesheets/style.css 304 2ms
Upon observation, it appears that the standard middleware express (connect) logging package works well with get requests that involve Routes and Views. However, I have noticed an issue with a specific get request that returns JSON data. This particular request is not being logged. Could there be an error in my implementation?
app.use(express.logger('dev'));
var data = {"testing": "fun"};
app.use(express.compress());
app.use(express.favicon('images/favicon.ico'));
app.use(express.json());
app.use(express.urlencoded());
app.get('/raw', rawData);
function rawData(req, res) {
res.set({'Cache-Control': 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0'});
res.set({'Content-Type': 'application/json' });
res.send(data); // adds content-length
};