Local console.logs in Functions

I’ve been searching and I feel like it’s such a common thing I might be searching for the wrong thing. I’m using netlify-dev and running it to run local functions/lambdas. That works fine but I see no console.log output for local development.

My code is simply:

exports.handler = async function (event, context, callback) {
  console.log(event)
}

The output I get is

Request from ::1: POST /.netlify/functions/createStripeSession
Response with status 200 in 173 ms.

So sounds like I’m very confused ha… so i’ve now commented out the entire file and im running netlify-dev --offline and restarted the netlify-dev server multiple times and I’m still getting a response. Sounds like netlify-dev doesn’t run functions offline? This must be coming from production?

Hey @OscarGodson, yes, that does look like a live endpoint. Without looking at your code, it’s hard to give specific advice (other than to ask if that call is hard-coded anywhere?), but I did want to share this thread that has some suggestions for running functions locally:

And these docs, which you’ve probably already checked out but sharing just in case :slight_smile:

Want to take a look and let us know if you have follow-up questions?