Skip to content

Commit

Permalink
fix!: remove print output option (#1559)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk authored Sep 2, 2022
1 parent b043fe0 commit 9f31825
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ All CLI options are optional:
--noStripTrailingSlashInUrl Don't strip trailing slash from http routes.
--noTimeout -t Disables the timeout feature.
--prefix -p Adds a prefix to every path, to send your requests to http://localhost:3000/[prefix]/[your_path] instead. Default: ''
--printOutput Turns on logging of your lambda outputs in the terminal.
--reloadHandler Reloads handler with each request.
--resourceRoutes Turns on loading of your HTTP proxy settings from serverless.yml
--useChildProcesses [This option is deprecated] Run handlers in a child process.
Expand Down
4 changes: 0 additions & 4 deletions src/config/commandOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ export default {
usage:
'Adds a prefix to every path, to send your requests to http://localhost:3000/prefix/[your_path] instead.',
},
printOutput: {
type: 'boolean',
usage: 'Outputs your lambda response to the terminal.',
},
reloadHandler: {
type: 'boolean',
usage: 'Reloads handler with each request.',
Expand Down
1 change: 0 additions & 1 deletion src/config/defaultOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default {
noStripTrailingSlashInUrl: false,
noTimeout: false,
prefix: '',
printOutput: false,
reloadHandler: false,
resourceRoutes: false,
useChildProcesses: false,
Expand Down
14 changes: 0 additions & 14 deletions src/events/http/HttpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,20 +894,6 @@ export default class HttpServer {
}
}

let whatToLog = result

try {
whatToLog = stringify(result)
} catch {
// nothing
} finally {
if (this.#options.printOutput) {
log.notice(
err ? `Replying ${statusCode}` : `[${statusCode}] ${whatToLog}`,
)
}
}

return response
}
}
Expand Down

0 comments on commit 9f31825

Please sign in to comment.