diff options
author | Diego <diegolparra@gmail.com> | 2015-11-25 00:28:31 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2015-11-25 00:28:31 -0300 |
commit | 05c38b4aba959c0c9aa4def450fb734a03b4e4b9 (patch) | |
tree | f709a15ba6452197343c932fd50e1bd22fdf6d93 /kamon-core/src/main/scala/kamon/Kamon.scala | |
parent | 75a7d67e7fb03e2386c0365f8731c27af8e0e765 (diff) | |
download | Kamon-05c38b4aba959c0c9aa4def450fb734a03b4e4b9.tar.gz Kamon-05c38b4aba959c0c9aa4def450fb734a03b4e4b9.tar.bz2 Kamon-05c38b4aba959c0c9aa4def450fb734a03b4e4b9.zip |
! core: Decoupling basic apis from reporters in order to improve Kamon tooling for tests
Diffstat (limited to 'kamon-core/src/main/scala/kamon/Kamon.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/Kamon.scala | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala index 54050c18..e6b93459 100644 --- a/kamon-core/src/main/scala/kamon/Kamon.scala +++ b/kamon-core/src/main/scala/kamon/Kamon.scala @@ -1,5 +1,5 @@ /* ========================================================================================= - * Copyright © 2013-2014 the kamon project <http://kamon.io/> + * Copyright © 2013-2015 the kamon project <http://kamon.io/> * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at @@ -19,10 +19,10 @@ import _root_.akka.actor._ import com.typesafe.config.{ Config, ConfigFactory } import kamon.metric._ import kamon.trace.TracerModuleImpl -import org.slf4j.LoggerFactory +import kamon.util.logger.LazyLogger object Kamon { - private val log = LoggerFactory.getLogger(getClass) + private val log = LazyLogger(getClass) trait Extension extends actor.Extension @@ -32,12 +32,13 @@ object Kamon { private lazy val _system = { val internalConfig = config.getConfig("kamon.internal-config") + val patchedConfig = config .withoutPath("akka") .withoutPath("spray") .withFallback(internalConfig) - log.info("Initializing KAMON DUUUDEEE") + log.info("Initializing Kamon...") ActorSystem("kamon", patchedConfig) } @@ -52,14 +53,9 @@ object Kamon { def shutdown(): Unit = { // TODO: Define what a proper shutdown should be like. + _system.shutdown() } - /* def apply[T <: Kamon.Extension](key: ExtensionId[T]): T = - key(_system) - - def extension[T <: Kamon.Extension](key: ExtensionId[T]): T = - apply(key)*/ - private def resolveConfiguration: Config = { val defaultConfig = ConfigFactory.load() |