Last active
December 8, 2020 17:51
-
-
Save zerosum/77b94a7d639fb81b6a7b73265da04f58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// airframe 20.12.1 | |
// | |
$ sbt run | |
[info] welcome to sbt 1.4.4 (AdoptOpenJDK Java 1.8.0_252) | |
... | |
02:47:59.727 [run-main-0] INFO w.a.lifecycle.LifeCycleManager - [session:663e7fd3] Starting a new lifecycle ... | |
02:47:59.734 [run-main-0] INFO w.a.lifecycle.LifeCycleManager - [session:663e7fd3] ======== STARTED ======== | |
02:47:59.736 [run-main-0] DEBUG wvlet.airframe.AirframeSession - [session:663e7fd3] Get dependency [DoSomething] (or create with factory) at Main.scala:14 | |
02:47:59.775 [run-main-0] DEBUG wvlet.airframe.AirframeSession - [session:663e7fd3] Init [DoSomething -> DoSomething]: Main$$anon$1@5ab11e1a | |
02:47:59.780 [run-main-0] INFO DoSomething - doing something | |
02:47:59.781 [run-main-0] INFO w.a.lifecycle.LifeCycleManager - [session:663e7fd3] Stopping the lifecycle ... | |
02:47:59.786 [run-main-0] INFO w.a.lifecycle.LifeCycleManager - [session:663e7fd3] The lifecycle has stopped. | |
[success] Total time: 4 s, completed 2020/12/09 2:47:59 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.slf4j.bridge.SLF4JBridgeHandler | |
import wvlet.airframe._ | |
import wvlet.log.Logger | |
object Main extends App { | |
Logger.init | |
SLF4JBridgeHandler.removeHandlersForRootLogger() | |
SLF4JBridgeHandler.install() | |
val design = newDesign.bind[DoSomething].toSingleton | |
design.build[DoSomething](x => x.doLogging()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment