Skip to content

Commit

Permalink
Added AKKA_LOG_LEVEL config constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
tillrohrmann committed Dec 18, 2014
1 parent fda5366 commit f96bca0
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ public final class ConfigConstants {
* Log lifecycle events
*/
public static final String AKKA_LOG_LIFECYCLE_EVENTS = "akka.log.lifecycle.events";

/**
* Log level for akka
*/
public static final String AKKA_LOG_LEVEL = "akka.loglevel";

// ----------------------------- Miscellaneous ----------------------------

Expand Down Expand Up @@ -619,6 +624,8 @@ public final class ConfigConstants {
public static boolean DEFAULT_AKKA_LOG_LIFECYCLE_EVENTS = false;

public static String DEFAULT_AKKA_FRAMESIZE = "10485760b";

public static String DEFAULT_AKKA_LOG_LEVEL = "OFF";


// ----------------------------- LocalExecution ----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ object AkkaUtils {

val logLifecycleEvents = if (lifecycleEvents) "on" else "off"

val logLevel = configuration.getString(ConfigConstants.AKKA_LOG_LEVEL,
ConfigConstants.DEFAULT_AKKA_LOG_LEVEL)

val configString = s"""akka.remote.transport-failure-detector.heartbeat-interval =
$transportHeartbeatInterval
|akka.remote.transport-failure-detector.acceptable-heartbeat-pause = $transportHeartbeatPause
Expand All @@ -92,6 +95,8 @@ object AkkaUtils {
|akka.remote.log-remote-lifecycle-events = $logLifecycleEvents
|akka.log-dead-letters = $logLifecycleEvents
|akka.log-dead-letters-during-shutdown = $logLifecycleEvents
|akka.loglevel = "$logLevel"
|akka.stdout-loglevel = "$logLevel"
""".stripMargin

getDefaultActorSystemConfigString + configString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class JobClient(jobManagerURL: String) extends Actor with ActorLogMessages with
case cancelJob: CancelJob =>
jobManager forward cancelJob
case SubmitJobAndWait(jobGraph, listen) =>
println("Submit job and wait.")
val listener = context.actorOf(Props(classOf[JobClientListener], sender()))
jobManager.tell(SubmitJob(jobGraph, listenToEvents = listen, detach = false), listener)
case RequestBlobManagerPort =>
Expand All @@ -62,6 +61,7 @@ class JobClientListener(client: ActorRef) extends Actor with ActorLogMessages wi
case SubmissionFailure(_, t) =>
client ! Failure(t)
self ! PoisonPill
case SubmissionSuccess(_) =>
case JobResultSuccess(_, duration, accumulatorResults) =>
client ! new JobExecutionResult(duration, accumulatorResults)
self ! PoisonPill
Expand Down
2 changes: 1 addition & 1 deletion flink-runtime/src/test/resources/log4j-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
################################################################################

# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=WARN, A1
log4j.rootLogger=OFF, A1

# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ object TestingUtils {

s"""akka.daemonic = on
|akka.loggers = ["akka.event.slf4j.Slf4jLogger"]
|akka.loglevel = "WARNING"
|akka.loglevel = "OFF"
|akka.logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
|akka.stdout-loglevel = "WARNING"
|akka.stdout-loglevel = "OFF"
|akka.jvm-exit-on-fata-error = off
|akka.log-config-on-start = off
|akka.actor.serializers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
12 changes: 0 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -441,18 +441,6 @@ under the License.
</profile>
</profiles>

<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
</exclusions>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
</exclusions>
<reporting>
<plugins>
<!-- execution of Unit Tests -->
Expand Down

0 comments on commit f96bca0

Please sign in to comment.