Lambda Trigger - Log Activity not wokring
akpuvvada opened this issue · comments
A. K. Puvvada commented
I have added logger activities in the my flow.
When I run it after creating Lambda function, I am not seeing any entries in logs related to these log activities.
Below is one of the log activity definition in code:
{
"id": "log_2",
"name": "Log_Request",
"description": "Logs a message",
"activity": {
"ref": "#log",
"input": {
"addDetails": true,
"message": "=string.concat('{\"zipC\": \"', $flow.CityCode_Input.zipcode, '\"}')"
}
}
}
Below are the logs from AWS:
2019/11/28 03:43:35 Starting AWS Lambda Trigger..
START RequestId: 2a3efb5c-7f7c-4b99-8a73-175ab2185568 Version: $LATEST
2019/11/28 03:43:35 Received request: 2a3efb5c-7f7c-4b99-8a73-175ab2185568
2019/11/28 03:43:35 Payload Type: unknown
2019/11/28 03:43:35 Payload: 'map[zipcode:07604]'
END RequestId: 2a3efb5c-7f7c-4b99-8a73-175ab2185568
REPORT RequestId: 2a3efb5c-7f7c-4b99-8a73-175ab2185568 Duration: 202.13 ms Billed Duration: 300 ms Memory Size: 512 MB Max Memory Used: 32 MB Init Duration: 6.79 ms
A. K. Puvvada commented
Please help!
Samip Kothari commented
The logger currently being used is bugged with lambda. You can update the log activity and change the json to.
{
....
"input": {
"addDetails": true,
"message": "=string.concat('{\"zipC\": \"', $flow.CityCode_Input.zipcode, '\"}')"
"usePrint": true
},
....
}
A. K. Puvvada commented
Sampi, tried that and still not working.
"tasks": [
{
"id": "log_2",
"name": "Log_Request",
"description": "Logs a message",
"activity": {
"ref": "#log",
"input": {
"addDetails": true,
"message": "=string.concat('{\"zipC\": \"', $flow.CityCode_Input.zipcode, '\"}')",
"usePrint": true
}
}
},
Samip Kothari commented
Did you run flogo update github.com/project-flogo/contrib/activity/log@master
?
A. K. Puvvada commented
no, let me try that.
A. K. Puvvada commented
Samip Kothari commented
Alright, I missed some things, Can you run that again?
A. K. Puvvada commented
Yes, it is working now.
Thanks Samip.