Giter Site home page Giter Site logo

Comments (8)

carlosmarin avatar carlosmarin commented on August 23, 2024 5

Since this came at the top of my google search, for others trying to do logging in Scala 2.x (< 2.11).

Use:

import com.typesafe.scalalogging.slf4j.Logger
import org.slf4j.LoggerFactory
val logger = Logger(LoggerFactory.getLogger("TheLoggerName"))

And @ build.sbt (libraryDependencies):
"com.typesafe" %% "scalalogging-slf4j" % "1.1.0"

from scala-logging.

hseeberger avatar hseeberger commented on August 23, 2024

Have you read the README? Under prerequisites it says Scala 2.11.

The old scalalogging (https://github.com/typesafehub/scalalogging) for Scala 2.10 is end of life.

from scala-logging.

rxin avatar rxin commented on August 23, 2024

Thanks for the prompt reply. It is pretty confusing to potential users because when we go to the old repo, it just says it is end of life and please move to a new repository.

This leads to confusions, such as the following question on the old repo: typesafehub/scalalogging#42

A few more questions:

  1. Do you expect other projects to use the 2.10 version from the old, discontinued repo?
  2. Are there any plans to have a version of scala-logging that supports both 2.10 and 2.11? Otherwise it makes it harder for downstream projects to cross-build for multiple Scala versions.

from scala-logging.

hseeberger avatar hseeberger commented on August 23, 2024

Scala Logging uses Scala Macros, which have been experimental in 2.10 and are still in 2.11. I'm pretty sure they won't go away, but they could change in ways that introduce breaking changes to any code using them. Anyway, I think one should consider any library which is using Scala Macros as experimental, i.e. expect some uncomfortable changes. Having said that, I think that Scala Logging 2.x will remain pretty stable.

Regarding your questions: If someone wants to use Scala Logging with Scala 2.10, then it has to be ScalaLogging 1.x (no space, no dash, old version). There are no plans to support a version of Scala Logging that supports both, Scala 2.10 and Scala 2.11. In particular ScalaLogging 1.x is end of life, i.e. won't be maintained any longer.

from scala-logging.

marmbrus avatar marmbrus commented on August 23, 2024

While I understand that macros are experimental and the interfaces might change in future releases, this level of churn is making it really hard for those of us who are trying to convince others that typesafe is building a stable ecosystem around Scala.

No where in the README (for either version of scala logging) does it say that because this library is based on macros, the library itself is "experimental" also. Its one thing to change experimental interfaces to the compiler, but the logging interface seems pretty set in stone.

I falsely assumed that because typesafe was releasing this library there would at least continue to be source compatible versions of it as long as releases of the 2.10.x branch were still actively being made. Now we are going to have to reevaluate using it at all.

Should I assume that any of the projects on the typesafehub could also be EOL-ed at any time?

from scala-logging.

mdedetrich avatar mdedetrich commented on August 23, 2024

Is it documented anywhere that libraries that use experimental features are also implicitly considered experimental as well?

from scala-logging.

rossabaker avatar rossabaker commented on August 23, 2024

I wish this would be reconsidered. Cross building several projects between Scala 2.10 and Scala 2.11, this is the lone dependency that demands more effort than a simple %%.

from scala-logging.

hseeberger avatar hseeberger commented on August 23, 2024

It's technically impossible, since Scala Logging 2.x is using macro features only available in Scala 2.11.

from scala-logging.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.