You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ni...@apache.org on 2022/05/26 08:00:51 UTC

[openwhisk] 08/08: Update according to review comment

This is an automated email from the ASF dual-hosted git repository.

ningyougang pushed a commit to branch add-container-count-metric
in repository https://gitbox.apache.org/repos/asf/openwhisk.git

commit 09d1e923008b9550330563c16b5b171917f01801
Author: ning.yougang <ni...@navercorp.com>
AuthorDate: Thu May 26 15:27:00 2022 +0800

    Update according to review comment
---
 .../scala/src/main/scala/org/apache/openwhisk/common/Logging.scala | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala b/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala
index 686a4b672..3072ff33d 100644
--- a/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala
+++ b/common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala
@@ -413,12 +413,7 @@ object LoggingMarkers {
   def INVOKER_CONTAINERPOOL_MEMORY(state: String) =
     LogMarkerToken(invoker, "containerPoolMemory", counter, Some(state), Map("state" -> state))(MeasurementUnit.none)
   def INVOKER_CONTAINERPOOL_CONTAINER(state: String, tags: Option[Map[String, String]] = None) = {
-    var map = Map("state" -> state)
-    tags.foreach { mapTags =>
-      for ((k, v) <- mapTags) {
-        map += (k -> v)
-      }
-    }
+    val map = Map("state" -> state) ++: tags.getOrElse(Map.empty)
     LogMarkerToken(invoker, "containerPoolContainer", counter, Some(state), map)(MeasurementUnit.none)
   }