1
0
mirror of https://github.com/ACINQ/eclair.git synced 2024-11-20 02:27:32 +01:00

now using slf4j/logback for logging

This commit is contained in:
pm47 2015-08-20 12:42:21 +02:00
parent 1cff2fc491
commit 70f85bfcbb
3 changed files with 14 additions and 4 deletions

View File

@ -19,6 +19,11 @@
<artifactId>akka-actor_${scala.version.short}</artifactId>
<version>${akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_${scala.version.short}</artifactId>
<version>${akka.version}</version>
</dependency>
<dependency>
<groupId>fr.acinq</groupId>
<artifactId>bitcoin-lib_${scala.version.short}</artifactId>
@ -40,5 +45,10 @@
<groupId>com.trueaccord.lenses</groupId>
<artifactId>lenses_${scala.version.short}</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
</dependencies>
</project>

View File

@ -1,4 +1,5 @@
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
actor {

View File

@ -19,7 +19,6 @@ sealed trait Data
case object Uninitialized extends Data
final case class ChannelParams(revocationHash: sha256_hash, minDepth: Int) extends Data
//blockchain events
sealed trait BlockchainEvent
final case class TxConfirmed(confirmations: Int)
@ -44,10 +43,10 @@ class Node extends LoggingFSM[State, Data] {
when(OPEN_WAITING) {
case Event(TxConfirmed(confirmations), params@ChannelParams(_, minDepth)) if confirmations < minDepth =>
log.info(s"got $confirmations confirmations for anchor tx")
log.info(s"got $confirmations confirmation(s) for anchor tx")
stay
case Event(TxConfirmed(confirmations), params@ChannelParams(_, minDepth)) if confirmations >= minDepth =>
log.info(s"got $confirmations confirmations for anchor tx, minDepth reached")
log.info(s"got $confirmations confirmation(s) for anchor tx, minDepth reached")
//TODO : send open complete message
goto(OPEN_WAIT_FOR_COMPLETE)
}