Skip to content
Permalink
Browse files

fix linting errors

  • Loading branch information...
jeremydaly committed Aug 1, 2019
1 parent ec512dd commit 41f430e521b0c111a3f61aaf65de1b267040938e
Showing with 5 additions and 3 deletions.
  1. +2 −2 index.js
  2. +3 −1 lib/logger.js
@@ -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))
})

@@ -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
@@ -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) => {

0 comments on commit 41f430e

Please sign in to comment.
You can’t perform that action at this time.