serverless / compose

Orchestrate Serverless Framework in monorepos
https://serverless.com/framework/docs/guides/compose
MIT License
111 stars 15 forks source link

Can't display logs for a single function #179

Open gdepouilly opened 1 year ago

gdepouilly commented 1 year ago

Are you certain it's a bug?

Are you using the latest version?

Is there an existing issue for this?

Issue description

Hi,

When using the following command : serverless logs --service=app --function=index,

I got the following error :

Environment: darwin, node 18.15.0, compose 1.3.0
Docs:        slss.io/docs-compose
Bugs:        github.com/serverless/compose/issues

Error:
Unrecognized CLI options: "--function"

I followed the documentation which states this exact command :

image

So, what is the correct way to display logs for a single function?

Service configuration (serverless-compose.yml) content

N/A

Command name and used flags

serverless logs --service=app --function=index

Command output

Environment: darwin, node 18.15.0, compose 1.3.0
Docs:        slss.io/docs-compose
Bugs:        github.com/serverless/compose/issues

Error:
Unrecognized CLI options: "--function"
marcelpanse commented 1 year ago

I have the same problem, doesn't work.

kellyp commented 1 year ago

Is there any chance there will be another compose release with fix in it?

edit: I did some digging into the code, got a single function deploy to work:

serverless service_name:deploy function --function function_name