To send the express or connect logs to a file use Node's writeStream.
For example to send the express logs to ./myLogFile.log :
open the stream to your file in append mode with :
var logFile = fs.createWriteStream('./myLogFile.log', {flags: 'a'}); //use {flags: 'w'} to open in write mode
then, in your express config use :
app.use(express.logger({stream: logFile}));
should also work for connect.logger.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…