cloudrunner-go icon indicating copy to clipboard operation
cloudrunner-go copied to clipboard

How to use cloudrunner.Logger properly?

Open liufuyang opened this issue 2 years ago • 0 comments

I got this

[go-integration-test] panic: cloudrunner.Logger must be called with a context from cloudrunner.Run [recovered]

error during an integration test while I added some code like this in a go file that talks to some db:

func (r *Repo) getStuff(ctx context.Context) ([]*stuff, error){
    logger := cloudrunner.Logger(ctx)
    logger.Info("...")
    ...
}

Is it because I used the logger wrongly?

Thank you.

liufuyang avatar Nov 10 '22 19:11 liufuyang