File tree 1 file changed +14
-5
lines changed
src/main/scala/com/thenewmotion/akka/http
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,25 @@ trait AkkaHttp {
12
12
private [http] var _actorSystem : Option [ActorSystem ] = None
13
13
14
14
private [http] def initAkkaSystem () {
15
- _actorSystem = Some (newHttpSystem())
16
- onSystemInit(_actorSystem.get)
15
+ val system = newHttpSystem()
16
+ _actorSystem = Some (system)
17
+ onSystemInit(system)
18
+ system.log.info(" Akka Http System '{}' created" , system)
19
+ logConfigOnInit()
20
+ }
21
+
22
+ private [http] def logConfigOnInit () {
23
+ _actorSystem.foreach {
24
+ system =>
25
+ val ext = HttpExtension (system)
26
+ if (ext.LogConfigOnInit ) ext.logConfiguration()
27
+ }
17
28
}
18
29
19
30
protected def newHttpSystem (): ActorSystem = {
20
31
val name = ConfigFactory .load().getString(" akka.http.system-name" )
21
32
val system = ActorSystem (name)
22
- val ext = HttpExtension (system)
23
- system.actorOf(Props [EndpointsActor ], ext.EndpointsName )
24
- if (ext.LogConfigOnInit ) ext.logConfiguration()
33
+ system.actorOf(Props [EndpointsActor ], HttpExtension (system).EndpointsName )
25
34
system
26
35
}
27
36
You can’t perform that action at this time.
0 commit comments