Skip to content

Commit

Permalink
feat: send all params to logger function (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Jan 29, 2021
1 parent 10c4d9d commit 4ab2cca
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/lib/logger.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
const logger = {
error (code, ...text) {
error (code, ...message) {
console.error(
`[next-auth][error][${code.toLowerCase()}]`,
JSON.stringify(text),
`\nhttps://next-auth.js.org/errors#${code.toLowerCase()}`
`\nhttps://next-auth.js.org/errors#${code.toLowerCase()}`,
...message
)
},
warn (code, ...text) {
warn (code, ...message) {
console.warn(
`[next-auth][warn][${code.toLowerCase()}]`,
JSON.stringify(text),
`\nhttps://next-auth.js.org/warnings#${code.toLowerCase()}`
`\nhttps://next-auth.js.org/warnings#${code.toLowerCase()}`,
...message
)
},
debug (code, ...text) {
debug (code, ...message) {
if (!process?.env?._NEXTAUTH_DEBUG) return
console.log(
`[next-auth][debug][${code.toLowerCase()}]`,
JSON.stringify(text)
...message
)
}
}
Expand Down

0 comments on commit 4ab2cca

Please sign in to comment.