Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: updates logger interface for Functions #144

Closed

Conversation

chaitanyakolluru
Copy link

@chaitanyakolluru chaitanyakolluru commented Jun 3, 2024

functions

Description of your changes

This change sets up FnLogger with Error() method and its implementation to allow for functions to log error instances along with adding them to RunFunctionResponse's Results array.

Fixes #143

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Manually tested against a local function that uses FnLogger in place of crossplane-runtime's logger as shown below:

type Function struct {
	fnv1beta1.UnimplementedFunctionRunnerServiceServer

	log    logging.FnLogger
}

@chaitanyakolluru chaitanyakolluru marked this pull request as ready for review June 3, 2024 19:18
functions

Signed-off-by: Chaitanya Kolluru <[email protected]>
@chaitanyakolluru
Copy link
Author

Closing pull request as using Info for logging fulfills our use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to log errors within the function
1 participant