Fix logging.
This commit is contained in:
parent
401efee7cb
commit
9c6f997c2a
2 changed files with 3 additions and 7 deletions
8
app.js
8
app.js
|
@ -13,12 +13,8 @@ const log = require('./lib/log');
|
|||
dot: true,
|
||||
});
|
||||
app.use(log4js.connectLogger(log.accessLog, {
|
||||
level: log4js.levels.INFO,
|
||||
format: (req, res, formatter) => {
|
||||
formatter(
|
||||
':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"'
|
||||
);
|
||||
}
|
||||
level: 'auto',
|
||||
format: ':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"'
|
||||
}));
|
||||
const pathMatches = [];
|
||||
app.use((req, _res, next) => {
|
||||
|
|
|
@ -15,5 +15,5 @@ log4js.configure({
|
|||
|
||||
module.exports = {
|
||||
default: log4js.getLogger('default'),
|
||||
accessLog: log4js.getLogger('accessLog')
|
||||
accessLog: log4js.getLogger('access')
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue