-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
The code support custom_tokens, but if the replacement is something like ctx.request.body,
I can't pass the option just like:
app.use(log4js.koaLogger(log4js.getLogger("http"), { level: 'auto',
tokens: [
{ token: ':body', replacement: ctx.request.body}
],
format: ':remote-addr - -' +
' ":method :url HTTP/:http-version"' +
' :status :content-length ":referrer"' +
' ":user-agent"' +
' :body'
}))
because ctx is not defined here.
I can use a wrapper, but is there any simple way to solve this problem?
Metadata
Metadata
Assignees
Labels
No labels