Contenu connexe
Similaire à Akka meetup 2014_sep
Similaire à Akka meetup 2014_sep (20)
Akka meetup 2014_sep
- 2. お前誰よ
• @Masahito
• P2P File Transfer Engineer at Skeed
Co. Ltd.
• I work with (Scala + Java) & JVM
• PyConJP2014 Speaker
- 9. Logging
class MyActor extends Actor with akka.actor.ActorLogging {
override def preStart() = {
log.debug("Starting")
}
}
↓フツーはapplication.confをclasspathが通ってるとこにおく
val config = ConfigFactory.parseString( """
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "DEBUG"
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
}
""")
val as = ActorSystem("test", config)
- 11. よく使うbuild.sbt
name := "testProject"
version := "0.1"
scalaVersion := "2.10.4"
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"ch.qos.logback" % "logback-classic" % "1.1.2"
)
- 15. 書籍
• Akka 公式ドキュメント
• Activatiorにあがってるソースを読むのがオススメ
• Akka in Action(オススメ!)
• すごいErlangゆかいに学ぼう!