sbt-slf4j


License

License

Categories

Categories

SLF4J Application Layer Libs Logging
GroupId

GroupId

com.github.eirslett
ArtifactId

ArtifactId

sbt-slf4j_2.10
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

sbt-slf4j
sbt-slf4j
Project URL

Project URL

https://github.com/eirslett/sbt-slf4j
Project Organization

Project Organization

com.github.eirslett
Source Code Management

Source Code Management

https://github.com/eirslett/sbt-slf4j

Download sbt-slf4j_2.10

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.eirslett/sbt-slf4j_2.10/ -->
<dependency>
    <groupId>com.github.eirslett</groupId>
    <artifactId>sbt-slf4j_2.10</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.eirslett/sbt-slf4j_2.10/
implementation 'com.github.eirslett:sbt-slf4j_2.10:0.1'
// https://jarcasting.com/artifacts/com.github.eirslett/sbt-slf4j_2.10/
implementation ("com.github.eirslett:sbt-slf4j_2.10:0.1")
'com.github.eirslett:sbt-slf4j_2.10:jar:0.1'
<dependency org="com.github.eirslett" name="sbt-slf4j_2.10" rev="0.1">
  <artifact name="sbt-slf4j_2.10" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.eirslett', module='sbt-slf4j_2.10', version='0.1')
)
libraryDependencies += "com.github.eirslett" % "sbt-slf4j_2.10" % "0.1"
[com.github.eirslett/sbt-slf4j_2.10 "0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.10.3
org.slf4j : slf4j-api jar 1.7.5

provided (1)

Group / Artifact Type Version
org.scala-sbt » logging jar 0.13.0

Project Modules

There are no modules declared in this project.

A bridge between sbt's plugin logger and SLF4J

You use it with your sbt plugin, or with inlined custom sbt tasks, so that you can include libraries that rely on SLF4J for logging.

Usage

Add it to your sbt plugin's dependencies, or - if you are writing custom sbt tasks inline in your build definition - add the dependency in ./project/slf4j.sbt.

libraryDependencies += "com.github.eirslett" %% "sbt-slf4j" % "0.1"

You have to setup SLF4J in every task implementation.

val foo = TaskKey[Unit]("foo", "do some foo stuff")
val fooTask = foo := {
  // Bind sbt logger to SLF4J
  StaticLoggerBinder.sbtLogger = streams.value.log

  // The library will now log through SBT's logger.
  MyFancyLibrary.performWork()
}

Building

sbt package, or sbt publishLocal

License

Apache 2

Versions

Version
0.1