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

avoids fail on complex structure when logging #223

Merged
merged 3 commits into from
Feb 23, 2021
Merged

avoids fail on complex structure when logging #223

merged 3 commits into from
Feb 23, 2021

Conversation

bmtheo
Copy link
Collaborator

@bmtheo bmtheo commented Feb 13, 2021

fix #177 by removing the prepareMessage (JSON.stringify) call when logging
The prepareMessage call is still needed for server logging thus complex structure don't working with server logging

fix #177 by removing the prepareMessage (JSON.stringify) call when logging
The prepareMessage call is still needed for server logging thus complex structure don't working with server logging
respect NGXLogInterface with string type for message

do the same processing it used to have for server logging without altering the data for console logging
@qortex
Copy link
Contributor

qortex commented Feb 22, 2021

Still not sure what this change achieves really. What am I missing?

@bmtheo
Copy link
Collaborator Author

bmtheo commented Feb 23, 2021

this avoid any fail related to the JSON.stringify call, the console.log do not use it and and it can log "complex structure" without any trouble
Example : this.logger.info(new FormGroup({ sub: new FormGroup({}) }));

The JSON.stringify is still used for server logging

I'm gonna look into this conflict to fix it

@bmtheo bmtheo merged commit d3e7075 into master Feb 23, 2021
Copy link
Contributor

@qortex qortex left a comment

Choose a reason for hiding this comment

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

ok

src/lib/logger.service.ts Show resolved Hide resolved
@qortex
Copy link
Contributor

qortex commented Feb 23, 2021

Ok yes, misread the code and thought the change did not achieve that.

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

Successfully merging this pull request may close these issues.

Cannot log FormGroup with innner FormGroup
3 participants