Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Mooyeee
Copy link

@Mooyeee Mooyeee commented Feb 18, 2025

Hello!

I rewrote the web logger printer in order to remove the dependency on the deprecated dart:html library.
I also made the already refactored download web logs implementation the default when on web (since jsinterop is a full substitution to dart:html).

Also, for the download, I avoided adding an element to the dom with a random name and instead created an anonymous AnchorElement in place and then removed after downloading the logs.

I have a question though: why the flutter logger doesn't use the default printer but instead uses print and flutter default log? (btw kIsWeb would be false when compiling to wasm, there is kIsWasm for that)
image

In my local implementation I tried using the default printer and it works as expected so I was wondering if there are some corner cases I'm not considering.

Kind regards,
Mooyeee

@Frezyx
Copy link
Owner

Frezyx commented Feb 20, 2025

Hello @Mooyeee !
Thank you for this contribution ❤️

Please fix analyzer issues before we merge this

@Frezyx Frezyx added enhancement New feature or request platform Issue/contribution related to platform specific stuff web Related to Flutter web, WASM and JS interop talker_flutter Related to talker_flutter package labels Feb 20, 2025
@Mooyeee
Copy link
Author

Mooyeee commented Feb 20, 2025

@Frezyx I can do it if you want, but the analyzer failed because of info messages that weren't introduced by this PR.
Also, is the wanted behaviour to fail on info messages?

image

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (769bbdc) to head (d75702a).
Report is 14 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master      #337      +/-   ##
===========================================
+ Coverage   98.44%   100.00%   +1.55%     
===========================================
  Files          28         8      -20     
  Lines         579        66     -513     
===========================================
- Hits          570        66     -504     
+ Misses          9         0       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Frezyx
Copy link
Owner

Frezyx commented Mar 14, 2025

Hello @Mooyeee !
I will merge this PR right now. But I have removed \uFFFD functionality
Can you open separated PR with \uFFFD special character?

// Note: \uFFFD is a special character that can cause a crash on web when logged
// Encountered while logging some italian stuff with accents (èéàùìò)

@Frezyx Frezyx merged commit 561b1e2 into Frezyx:master Mar 14, 2025
2 checks passed
@Mooyeee
Copy link
Author

Mooyeee commented Mar 17, 2025

Hello,
Sure, I'll do it as soon as I can :)

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

Labels

enhancement New feature or request platform Issue/contribution related to platform specific stuff talker_flutter Related to talker_flutter package web Related to Flutter web, WASM and JS interop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants