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

Payload not available to JS #346

Closed
robertfmurdock opened this issue Aug 3, 2023 · 7 comments
Closed

Payload not available to JS #346

robertfmurdock opened this issue Aug 3, 2023 · 7 comments

Comments

@robertfmurdock
Copy link
Contributor

ATM, the "formatter" interfaces only receive the message, which makes it impossible to fold in any structured information from the payload.

This prevents using the payload as a meaningful structure in a multiplatform logging sense, as only some platforms will be able to access it 😭

@oshai
Copy link
Owner

oshai commented Aug 3, 2023

We can pass the payload to the formatter... how do you think such api should look like?

@robertfmurdock
Copy link
Contributor Author

I imagine passing it down alongside the message would be sufficient

@oshai
Copy link
Owner

oshai commented Aug 6, 2023

Something like this: #347 ?

@robertfmurdock
Copy link
Contributor Author

Makes sense to me. Would it make sense for the message to be passed through as the simple string then instead of the function arg? Or both of them be passed as function args? It seems slightly inconsistent for one to be a function producer and the other a flat map, but if there's an underlying mechanical reason that'd be fine

@oshai
Copy link
Owner

oshai commented Aug 8, 2023

Thanks, I am planning to make a bit bigger change by having a shared module for both native and js (non delegating platforms), so I will add it as part of that.

@oshai
Copy link
Owner

oshai commented Aug 9, 2023

@robertfmurdock see the planned changes in #350

@oshai
Copy link
Owner

oshai commented Aug 10, 2023

Fixed in #350

@oshai oshai closed this as completed Aug 10, 2023
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

No branches or pull requests

2 participants