openwhisk-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [openwhisk] jiangpengcheng commented on a change in pull request #4609: Add namespace field to activation log
Date Mon, 23 Sep 2019 01:35:30 GMT
jiangpengcheng commented on a change in pull request #4609: Add namespace field to activation
log
URL: https://github.com/apache/openwhisk/pull/4609#discussion_r326931362
 
 

 ##########
 File path: common/scala/src/main/scala/org/apache/openwhisk/core/database/ActivationFileStorage.scala
 ##########
 @@ -84,9 +84,11 @@ class ActivationFileStorage(logFilePrefix: String,
 
   private def transcribeLogs(activation: WhiskActivation, additionalFields: Map[String, JsValue])
=
     activation.logs.logs.map { log =>
-      val line = JsObject(
-        Map("type" -> "user_log".toJson) ++ Map("message" -> log.toJson) ++ Map(
-          "activationId" -> activation.activationId.toJson) ++ additionalFields)
+      val line =
+        JsObject(
+          Map("type" -> "user_log".toJson) ++ Map("message" -> log.toJson) ++ Map(
+            "activationId" -> activation.activationId.toJson) ++ Map(
+            "namespace" -> activation.namespace.asString.toJson) ++ additionalFields)
 
 Review comment:
   but then activation will also has an extra "namespace" field, is that ok?
   https://github.com/apache/openwhisk/blob/400a7915115576a363858788a6d080c389a80317/common/scala/src/main/scala/org/apache/openwhisk/core/database/ActivationFileStorage.scala#L116

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message