New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error log output #5378

merged 2 commits into from Dec 31, 2018


None yet
3 participants
Copy link

medikoo commented Oct 11, 2018

What did you implement:

I addressed regression introduced with #4912 as since then due to following line:

this.serverless.cli.consoleLog(, null, 4)));

errors are logged as {} (errors do not have JSON representation), example of log I received:

screen shot 2018-10-11 at 16 36 24

Proposed patch ensures that errors are logged properly (with stack trace and all it's properties) and in red (as proposed with #4912)

/cc @lewisf

How did you implement it:

I used Node.js native util.inspect

Is this ready for review?: YES
Is it a breaking change?: NO

@medikoo medikoo force-pushed the medikoo:fix-error-output branch from 42a0683 to 5fa15e1 Oct 11, 2018


This comment has been minimized.

Copy link

horike37 commented Oct 13, 2018

Thank you for your contribution 👍
IMO, would be great if you can write a test code for this fix, otherwise this regression might be introduced accidentally in the future.


This comment has been minimized.

Copy link

medikoo commented Oct 18, 2018

IMO, would be great if you can write a test code for this fix

Good idea. Added

Copy link

horike37 left a comment

Thank you for updating 👍

@horike37 horike37 merged commit b7936de into serverless:master Dec 31, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.04%) to 91.125%

dschep added a commit that referenced this pull request Jan 9, 2019

v1.36.0 release!
 - [Log AWS SDK calls in debug mode](#5604)
 - [Added currently supported regions for GCP functions](#5601)
 - [Update Cloudflare Templates](#5620)
 - [AWS: Validate rate/cron syntax before Deploy](#5635)
 - [Fix error log output](#5378)
 - [Support for native async/await in AWS Lambda for aws-nodejs-typescript template ](#5607)
 - [aws-csharp create template uses handler-specific artifact](#5411)
 - [change behaviour on initial stack create failed](#5631)
 - [Add warning for multiple functions having same handler](#5638)
 - [AWS: Add API Gateway stage name validation.](#5639)

@dschep dschep referenced this pull request Jan 9, 2019


v1.36.0 release! #5670

@shortjared shortjared added this to the 1.36.0 milestone Jan 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment