Serverless-offline: Disable response body logging

Created on 16 Apr 2018  ·  7Comments  ·  Source: dherault/serverless-offline

Is there a way to disable or truncate the response body logging?

Right now I see:

Serverless: [200] {"statusCode":200,"body": "{ 
...500kb of unintelligible json.. 
}" }

Which completely floods the terminal making the logs impossible to read.

Most helpful comment

@xcoderzach have you tried --dontPrintOutput ?

All 7 comments

@xcoderzach have you tried --dontPrintOutput ?

wow, I'm an idiot. Totally missed that. Thank you.

@steve-a-jones is there a way to disable it per function?
For instance I want to remove it for graphiql or playground but not graphql

with --dontPrintOutput on v3.28.0 i still see a lot of sls-offline logs, specifically the whole payload and event object. Is there a way to stop printing them also?

@shierro This is working for me, no outputs at all: sls offline --noTimeout --dontPrintOutput --stage dev

Version 3.31.3

With serverless-offline v4 you won't have any output by default, plus lots of bug fixes. Cheers.

@Sigmus I have set SLS_DEBUG on my .env file 🤣 🤦‍♂️
@dherault V4 seems to work well. Thanks for your hard work! 👏

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattmeye picture mattmeye  ·  4Comments

ghost picture ghost  ·  4Comments

dnalborczyk picture dnalborczyk  ·  3Comments

stunningpixels picture stunningpixels  ·  3Comments

JimLynchCodes picture JimLynchCodes  ·  4Comments