-
Notifications
You must be signed in to change notification settings - Fork 31
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
Logging unavailable at runtime unless logging
tag passed to compile
#187
Comments
We also stumbled upon this today. Wondering why logging isn't enabled by default? Deploying a custom Lambda that doesn't log anything is surprising, to say the least. |
We also stumbled upon this today. We followed the instructions of adding TAG=logging to the build process, but the CloudWatch Group was not created. Is there anything else that needs to be toggled as well, to see the logs of the custom resource? |
@isimluk I'm having the same problem, did you get a resolution? |
What would make this more obvious? README doc updates? Or do you think it would be better to remove the tagging and enable logging by default? |
@kddejong My vote is It would be good to know if the resulting CloudWatch writer is compatible with |
I checked my configuration -- it was a long time ago, and I don't remember doing anything special to get logging, and my IAM roles don't mention CloudWatch. Make sure you are passing the
I use // Pass the Go logging framework writer as the target for zerolog. The CFN resource
// framework sets a custom Cloudwatch Logs writer on
// "log", so we need to use this to write zerolog output to Cloudwatch
// Logs too.
log.Logger = zerolog.New(golog.Writer()).
With().
Str("handler", handlerName).
Logger() |
I am sorry, I cannot remember. It has been a good while. Check you have proper permissions given to the lambda, that may be the root cause of not seeing any logs. Here is the lambda that I published a while ago and works fine. |
I have CloudWatch logging working through Anyone able to grab their logging when Code snippet for
|
If you create a new project using the Go template, no logging will be received unless the project is compiled with the
logging
tag.This can be done by changing the
makebuild
file to include the tag, or running make with theTAGS
environment variable defined:How can this be made more obvious?
Suggestions:
makebuild
file to note the values accepted byTAGS
and the effectresource.go
describing how logging can be enabledI found out the way to enable logging via a hint in aws-cloudformation/cloudformation-cli#391; this could be made more discoverable for others.
The text was updated successfully, but these errors were encountered: