event-gateway icon indicating copy to clipboard operation
event-gateway copied to clipboard

Errors not logged when running with -log-level=debug

Open rupakg opened this issue 7 years ago • 0 comments

Running event-gateway and showing output below:

docker run --rm -p 8055:8055 -p 8056:8056 event-gateway -events-port 8055 -config-port 8056 -dev -log-level=debug
INFO	Running in development mode with embedded etcd.
DEBUG	Function registered.	{"functionId": "getUser", "type": "awslambda"}
DEBUG	Function cache received set key.	{"key": "getUser", "value": "{\"functionId\":\"getUser\",\"provider\":{\"type\":\"awslambda\",\"arn\":\"arn:aws:lambda:us-east-1:063733696545:function:user-service-prod-getUser\",\"region\":\"us-east-1\"}}"}
DEBUG	Function registered.	{"functionId": "test", "type": "awslambda"}
DEBUG	Function cache received set key.	{"key": "test", "value": "{\"functionId\":\"test\",\"provider\":{\"type\":\"awslambda\",\"arn\":\"arn:aws:lambda:us-east-1:063733696545:function:user-service-prod-test\",\"region\":\"us-east-1\"}}"}

Tried few calls that work and few which generate errors, but the log does not show log for calls that generate errors:

curl -X POST http://localhost:8056/v1/functions 
  -d '{
	"functionId": "test2", 
	"provider": {
		"type": "awslambda",
		"arn": "arn:aws:lambda:us-east-1:063733696545:function:user-service-prod-test2", 
		"region": "", 
		"accessKeyId": "", 
		"secretAccessKey": ""
	}
}'

# response
{
    "error": "Function doesn't validate. Validation error: \"Missing required fields for AWS Lambda function.\""
}
curl -X POST http://localhost:8056/v1/functions 
  -d '{
	"functionId": "test", 
	"provider": {
		"type": "awslambda",
		"arn": "arn:aws:lambda:us-east-1:063733696545:function:user-service-prod-test", 
		"region": "us-east-1", 
		"accessKeyId": "", 
		"secretAccessKey": ""
	}
}'

# response
{
    "error": "Function \"test\" already registered."
}

rupakg avatar Aug 05 '17 06:08 rupakg