@@ -25,13 +25,13 @@ class DockerActor(connection: DockerConnection) extends Actor with ActorLogging
25
25
def receive : PartialFunction [Any , Unit ] = {
26
26
27
27
case start(containerId) =>
28
- log.info (s " Docker Container started " )
29
- Try (Await .result(container.start(containerId), Duration .Inf )) match {
30
- case Success (_) =>
31
- sender ! Status .Success
32
- case Failure (ex) =>
33
- sender ! Status .Failure (ex)
34
- }
28
+ log.debug (s " Docker Container started " )
29
+ Try (Await .result(container.start(containerId), Duration .Inf )) match {
30
+ case Success (_) =>
31
+ sender ! Status .Success
32
+ case Failure (ex) =>
33
+ sender ! Status .Failure (ex)
34
+ }
35
35
36
36
case create(componentType, instanceId, containerName) =>
37
37
val containerConfig = ContainerConfig (Image = DockerImage .getImageName(componentType),
@@ -58,7 +58,7 @@ class DockerActor(connection: DockerConnection) extends Actor with ActorLogging
58
58
}
59
59
60
60
case stop(containerId) =>
61
- log.info (s " Stopping docker container.. " )
61
+ log.debug (s " Stopping docker container.. " )
62
62
63
63
Try (Await .result(container.stop(containerId), Duration .Inf )) match {
64
64
case Success (_) =>
@@ -68,9 +68,8 @@ class DockerActor(connection: DockerConnection) extends Actor with ActorLogging
68
68
}
69
69
70
70
71
-
72
71
case delete(containerId) =>
73
- log.info (s " Deleting docker container.. " )
72
+ log.debug (s " Deleting docker container.. " )
74
73
Try (Await .result(container.remove(containerId, force = false , removeVolumes = false ), Duration .Inf )) match {
75
74
case Success (_) =>
76
75
sender ! Status .Success
@@ -79,7 +78,7 @@ class DockerActor(connection: DockerConnection) extends Actor with ActorLogging
79
78
}
80
79
81
80
case pause(containerId) =>
82
- log.info (s " Pausing docker container.. " )
81
+ log.debug (s " Pausing docker container.. " )
83
82
Try (Await .result(container.pause(containerId), Duration .Inf )) match {
84
83
case Success (_) =>
85
84
sender ! Status .Success
@@ -88,7 +87,7 @@ class DockerActor(connection: DockerConnection) extends Actor with ActorLogging
88
87
}
89
88
90
89
case unpause(containerId) =>
91
- log.info (s " Unpausing docker container.. " )
90
+ log.debug (s " Unpausing docker container.. " )
92
91
Try (Await .result(container.unpause(containerId), Duration .Inf )) match {
93
92
case Success (_) =>
94
93
sender ! Status .Success
@@ -97,7 +96,7 @@ class DockerActor(connection: DockerConnection) extends Actor with ActorLogging
97
96
}
98
97
99
98
case restart(containerId) =>
100
- log.info (s " Restarting docker container.. " )
99
+ log.debug (s " Restarting docker container.. " )
101
100
Try (Await .result(container.restart(containerId), Duration .Inf )) match {
102
101
case Success (_) =>
103
102
sender ! Status .Success
@@ -106,7 +105,7 @@ class DockerActor(connection: DockerConnection) extends Actor with ActorLogging
106
105
}
107
106
108
107
case runCommand(containerId, command, attachStdin, attachStdout, attachStderr, detachKeys, privileged, tty, user) =>
109
- log.info (s " running command in docker container.. " )
108
+ log.debug (s " running command in docker container.. " )
110
109
val createCommand = Try (Await .result(container.commandCreate(containerId, command, attachStdin, attachStdout, attachStderr, detachKeys, privileged, tty, user), Duration .Inf ))
111
110
createCommand match {
112
111
case Failure (ex) => sender ! Failure (ex)
@@ -124,7 +123,7 @@ class DockerActor(connection: DockerConnection) extends Actor with ActorLogging
124
123
125
124
log.info(s " Fetching Container logs: stdErrSelected -> $stdErrSelected, stream -> $stream" )
126
125
127
- if (! stream){
126
+ if (! stream) {
128
127
val logResult = Try (Await .result(container.retrieveLogs(containerId, stdErrSelected), Duration .Inf ))
129
128
logResult match {
130
129
case Failure (ex) =>
@@ -173,4 +172,5 @@ object DockerActor {
173
172
tty : Option [Boolean ],
174
173
user : Option [String ]
175
174
)
175
+
176
176
}
0 commit comments