sbt-slf4j

An SLF4j backend that utilizes the SBT TaskStreams log.

Лицензия

Лицензия

Категории

Категории

SLF4J Библиотеки уровня приложения Logging
Группа

Группа

com.vast.sbt
Идентификатор

Идентификатор

sbt-slf4j
Последняя версия

Последняя версия

0.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

sbt-slf4j
An SLF4j backend that utilizes the SBT TaskStreams log.
Ссылка на сайт

Ссылка на сайт

https://github.com/vast-engineering
Организация-разработчик

Организация-разработчик

com.vast.sbt
Система контроля версий

Система контроля версий

https://github.com/vast-engineering/sbt-slf4j

Скачать sbt-slf4j

Как подключить последнюю версию

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.scala-lang : scala-library jar 2.10.4
org.slf4j : slf4j-api jar 1.7.7

provided (1)

Идентификатор библиотеки Тип Версия
org.scala-sbt » logging jar 0.13.5

Модули Проекта

Данный проект не имеет модулей.

sbt-slf4j

This is an SLF4J backend that binds to an underlying SBT log.

To use this plugin, add the following to your build -

project/plugins.sbt

...
libraryDependencies += "com.vast.sbt" %% "sbt-sl4fj" % "0.2.1"
...

In tasks that call out to libraries that use slf4j, wrap the task implementation with the following

import sbt._
import com.vast.sbtlogger.SbtLogger._

object SomeBuild {

 lazy val someTaskKey = taskKey[Unit]("Does some sort of work")

 lazy val someBuildSettings = Seq(
    someTaskKey := {
      withLogger(streams.value.log) {
        ...
        //do some work
        ...
      }
    }
 )
}

This will bind the task-scoped streams log to slf4j for the thread executing the task and any threads spawned from it. Since SBT will close the stream after the task body itself finishes execution, it's your responsibility to ensure that any spwaned threads complete before the main task body does - otherwise, you'll get an exception stating the stream has already been closed.

license

See LICENSE.

com.vast.sbt

Vast Engineering

Версии библиотеки

Версия
0.2.0