Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydaly committed Aug 1, 2019
1 parent ec512dd commit 41f430e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class API {

// Output logs
response._request._logs.forEach(log => {
this._logger.logger(JSON.stringify(this._logger.detail ? // eslint-disable-line no-console
this._logger.logger(JSON.stringify(this._logger.detail ?
this._logger.format(log,response._request,response) : log))
})

Expand All @@ -321,7 +321,7 @@ class API {
this._logger.log('access',undefined,response._request,response._request.context),
{ statusCode: res.statusCode, coldStart: response._request.coldStart, count: response._request.requestCount }
)
this._logger.logger(JSON.stringify(this._logger.format(access,response._request,response))) // eslint-disable-line no-console
this._logger.logger(JSON.stringify(this._logger.format(access,response._request,response)))
}

// Reset global error code
Expand Down
4 changes: 3 additions & 1 deletion lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ exports.config = (config,levels) => {
}

// Overridable logging function
let logger = cfg.log && typeof cfg.log === 'function' ? cfg.log : (...a) => console.log(...a)
let logger = cfg.log && typeof cfg.log === 'function' ?
cfg.log :
(...a) => console.log(...a) // eslint-disable-line no-console

// Main logging function
let log = (level,msg,req,context,custom) => {
Expand Down

0 comments on commit 41f430e

Please sign in to comment.