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

Deep copy msg object (fix the issue: logger.info({message:...}) modifies original object) #2473

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bhavesh-Parmar
Copy link

@Bhavesh-Parmar Bhavesh-Parmar commented Jun 8, 2024

Fixing the belwo issue( resolves #1775) by deep copy the message

const data = {'message':'hello'}
logger.log(data)
// now data contains "level":"info"

@Bhavesh-Parmar Bhavesh-Parmar marked this pull request as draft June 8, 2024 07:19
@Bhavesh-Parmar Bhavesh-Parmar marked this pull request as ready for review June 8, 2024 07:21
Copy link

@MrSuddenJoy MrSuddenJoy left a comment

Choose a reason for hiding this comment

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

This code looks good to me. Well done 👍🏻

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.

logger.info({message:...}) modifies original object
2 participants