Comments (8)
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.
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.
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:
- Do you expect other projects to use the 2.10 version from the old, discontinued repo?
- 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.
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.
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.
Is it documented anywhere that libraries that use experimental features are also implicitly considered experimental as well?
from scala-logging.
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.
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)
- request: Declare version scheme / policy HOT 2
- `when***Enabled()` methods are missing in LoggerTakingImplicitImpl HOT 1
- ditch Travis-CI, switch to GitHub Actions
- Unpatched vulnerability - https://jira.qos.ch/browse/LOGBACK-1591 HOT 4
- Logging Macro Doesn't Support Scala2 + Scala3 Simultaneously HOT 2
- Example for AnyLogging
- Example for StrictLogging
- Include a way to create Logger always with the name of the class into which it is defined
- Remove type annotation warnings from test files
- Current release is compiled for Java 8 but requires Java 9 in bundle manifest HOT 7
- Varargs compilation error as of v3.9.5 HOT 3
- Disable logging HOT 1
- Expose the SLF4J2 LoggingEventBuilder "Fluent" API
- Illegal Update to non-static final field - Gradle 7.6 HOT 1
- Fix CVE-2022-36944 for scala 2.13.x before 2.13.9 HOT 15
- String Interpolation Limitations
- Bump slf4j-api dependency to 2.x HOT 3
- New volunteer maintainer(s) needed HOT 9
- Message formatting (interpolation) with last argument of Throwable
- In Scala3, using a non-inline variable-length parameter doesn't print correctly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scala-logging.