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(envited.ascs.digital): stuctured logger #81

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

royscheeren
Copy link
Contributor

Scope

We need a good way to filter through server logs when something goes wrong

Work done

  • Created a custom error class to handle all our extra information
  • Refactor existing errors to use custom error class
  • Abstracted out the logger
  • Refactor error logs on server actions

@royscheeren royscheeren changed the title 66 stuctured logger feat(envited.ascs.digital): stuctured logger Feb 1, 2024
resource: 'users',
resourceId: id,
message: 'Not allowed to delete this resource',
userId: session.user.id,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have an utility function to extract this value from the session

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where? I only see from credential?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, using the path in the credentials utils I see

@royscheeren royscheeren merged commit 1b94ce8 into develop Feb 1, 2024
1 check passed
@royscheeren royscheeren deleted the 66_stuctured_logger branch February 1, 2024 18:04
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.

2 participants