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

Implement a Scala.js ConsoleLogger #680

Closed
armanbilge opened this issue Aug 22, 2022 · 4 comments · Fixed by #694
Closed

Implement a Scala.js ConsoleLogger #680

armanbilge opened this issue Aug 22, 2022 · 4 comments · Fixed by #694

Comments

@armanbilge
Copy link
Member

There's currently no "default" logging backend for Scala.js, but it should be easy to add one based on the JavaScript console APIs. Technically console is not part of core JavaScript, but it is specced and is fairly standard across Node.js and browsers.

I'm not a maintainer on this repo so if someone works on this or has questions please make sure to ping me :)

@armanbilge
Copy link
Member Author

Here's a partial facade for the console APIs. We should inline it instead of adding a dependency to scala-js-dom because that dependency makes sense only for browsers.

https://github.com/scala-js/scala-js-dom/blob/51a807cc04ea134ece030d6d4005a8ce30c1de99/dom/src/main/scala/org/scalajs/dom/Console.scala

@2chilled
Copy link

@danicheg It seems like there is no release including this functionality available yet. Can we change that? Would be great!

@armanbilge
Copy link
Member Author

Yes, I'd love a release with this too. Until then, there is a snapshot.
https://s01.oss.sonatype.org/content/repositories/snapshots/org/typelevel/log4cats-js-console_sjs1_3/2.5.0-99-e87a0cd-SNAPSHOT/

@rossabaker
Copy link
Member

I just created a 3.6.0 milestone with the things that are almost ready, and we can get a new release.

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 a pull request may close this issue.

3 participants