claudiajs / claudia-api-builder

Use AWS API Gateway as if it were a lightweight JavaScript web server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Log path to CloudWatch

calebjclark opened this issue · comments

First off, I love Claudia and claudia-api-builder! Kudos on an amazing project!!

One frustration I've noticed is with logging. AWS Lambda automatically logs requests to CloudWatch, but since claudia-api-builder sends all routes to the same Lambda, all the logs in CloudWatch are grouped under a single Lambda function. This makes it impossible to know which route was used to access the lambda without adding console.log inside every route handler. This latter option feels verbose as it seems this info should be logged by default.

Would a pull-request be amenable?

Hi,

please use github issues for bugs only. for questions like this one, please use the Claudia.js Gitter Chat instead: https://gitter.im/claudiajs/claudia

It seems this is more of a feature request/discussion than a help question. I'm not asking for how to do something (although please tell me if I overlooked an existing feature).

I spent time perusing the source code for the best place to add this functionality (it seems to be https://github.com/claudiajs/claudia-api-builder/blob/master/src/api-builder.js#L210), and I offered to send a pull request.

If this feature is not deemed valuable to the project, please let me know, and I believe it would be helpful to document the reason on github for others. Ephemeral chats like Gitter are great for support but in my opinion, not a great place for documenting feature discussions for an open source project.

I hope this post does not come across as offensive; I am in no way trying to be offensive. I love what you have created, and as its creator, you have the right to run the project as you wish.

hi - thanks for the offer (and it doesn't come as offensive in no way, hopefully this doesn't come across as offensive either), but we want to avoid having discussions in github issues. we simply don't have the capacity to support that, so our project maintenance policy is to discourage questions and discussions here.

@gojko I disagree, if someone googles for the same question @calebjclark is asking they'd find this but they wouldn't be able to find that in Gitter. It seems that asking and answering questions here would limit the amount of duplicated questions.

Gitter sucks soooo much!!! Please change your policy and allow questions in here