serverless-heaven / serverless-aws-alias

Alias support for Serverless 1.x
MIT License
189 stars 68 forks source link

Support version flag for serverless logs to show logs for any previously deployed function version #62

Closed HyperBrain closed 6 years ago

HyperBrain commented 7 years ago

serverless logs --function=XXXX --alias=XXXX will only show the logs of the currently deployed function version. In case you want to compare the current logs with logs from versions that had been deployed previously, they will not be accessible with the command, but only with the AWS CW console. The old function logs normally are kept until the CW logs expiration is triggered.

This could be solved with a --version switch, that lets you select a specific version of the logs to show. E.g. serverless logs --function=myFunc --version=130 would show the myFunc logs of version 130.