You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2018/02/21 14:20:49 UTC
[incubator-openwhisk] branch master updated: Remove two log
messages, tweak logging with metrics,
add log message for conductors. (#3299)
This is an automated email from the ASF dual-hosted git repository.
csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new b55e46c Remove two log messages, tweak logging with metrics, add log message for conductors. (#3299)
b55e46c is described below
commit b55e46c684a5bbe3bd1662cc2587a7f033afb3c9
Author: rodric rabbah <ro...@gmail.com>
AuthorDate: Wed Feb 21 06:20:44 2018 -0800
Remove two log messages, tweak logging with metrics, add log message for conductors. (#3299)
---
common/scala/src/main/scala/whisk/common/TransactionId.scala | 4 +++-
.../whisk/core/controller/actions/PrimitiveActions.scala | 4 +++-
.../whisk/core/controller/actions/SequenceActions.scala | 12 ++++++------
.../whisk/core/loadBalancer/ContainerPoolBalancer.scala | 6 +-----
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/common/scala/src/main/scala/whisk/common/TransactionId.scala b/common/scala/src/main/scala/whisk/common/TransactionId.scala
index 09ca1fd..4cbcd71 100644
--- a/common/scala/src/main/scala/whisk/common/TransactionId.scala
+++ b/common/scala/src/main/scala/whisk/common/TransactionId.scala
@@ -121,7 +121,9 @@ case class TransactionId private (meta: TransactionMetadata) extends AnyVal {
InfoLevel,
this,
from,
- createMessageWithMarker(message, LogMarker(endMarker, deltaToStart, Some(deltaToEnd))))
+ createMessageWithMarker(
+ if (logLevel <= InfoLevel) message else "",
+ LogMarker(endMarker, deltaToStart, Some(deltaToEnd))))
} else {
logging.emit(logLevel, this, from, message)
}
diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
index 24817f3..f77d9bf 100644
--- a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
@@ -281,6 +281,8 @@ protected[actions] trait PrimitiveActions {
accounting = accounting.getOrElse(CompositionAccounting()), // share accounting with caller
logs = Buffer.empty)
+ logging.info(this, s"invoking composition $action topmost ${cause.isEmpty} activationid '${session.activationId}'")
+
val response: Future[Either[ActivationId, WhiskActivation]] =
invokeConductor(user, payload, session).map(response => Right(completeActivation(user, session, response)))
@@ -587,7 +589,7 @@ protected[actions] trait PrimitiveActions {
case _ =>
// active ack received but it does not carry the response,
// no result available except by polling the db
- logging.warn(this, "pre-emptively polling db because active ack is missing result")
+ logging.warn(this, "preemptively polling db because active ack is missing result")
finisher ! Scheduler.WorkOnceNow
}
diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala b/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala
index 6232c0e..ae601f3 100644
--- a/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala
@@ -73,11 +73,11 @@ protected[actions] trait SequenceActions {
*
* @param user the user invoking the action
* @param action the sequence action to be invoked
- * @param payload the dynamic arguments for the activation
- * @param blocking true iff this is a blocking invoke
- * @param topmost true iff this is the topmost sequence invoked directly through the api (not indirectly through a sequence)
* @param components the actions in the sequence
+ * @param payload the dynamic arguments for the activation
+ * @param waitForOutermostResponse some duration iff this is a blocking invoke
* @param cause the id of the activation that caused this sequence (defined only for inner sequences and None for topmost sequences)
+ * @param topmost true iff this is the topmost sequence invoked directly through the api (not indirectly through a sequence)
* @param atomicActionsCount the dynamic atomic action count observed so far since the start of invocation of the topmost sequence(0 if topmost)
* @param transid a transaction id for logging
* @return a future of type (ActivationId, Some(WhiskActivation), atomicActionsCount) if blocking; else (ActivationId, None, 0)
@@ -166,7 +166,7 @@ protected[actions] trait SequenceActions {
// This should never happen; in this case, there is no activation record created or stored:
// should there be?
- case Failure(t) => logging.error(this, s"Sequence activation failed: ${t.getMessage}")
+ case Failure(t) => logging.error(this, s"sequence activation failed: ${t.getMessage}")
}
}
@@ -326,7 +326,7 @@ protected[actions] trait SequenceActions {
val futureWhiskActivationTuple = action.toExecutableWhiskAction match {
case None =>
val SequenceExecMetaData(components) = action.exec
- logging.info(this, s"sequence invoking an enclosed sequence $action")
+ logging.debug(this, s"sequence invoking an enclosed sequence $action")
// call invokeSequence to invoke the inner sequence; this is a blocking activation by definition
invokeSequence(
user,
@@ -339,7 +339,7 @@ protected[actions] trait SequenceActions {
accounting.atomicActionCnt)
case Some(executable) =>
// this is an invoke for an atomic action
- logging.info(this, s"sequence invoking an enclosed atomic action $action")
+ logging.debug(this, s"sequence invoking an enclosed atomic action $action")
val timeout = action.limits.timeout.duration + 1.minute
invokeAction(user, action, inputPayload, waitForResponse = Some(timeout), cause) map {
case res => (res, accounting.atomicActionCnt + 1)
diff --git a/core/controller/src/main/scala/whisk/core/loadBalancer/ContainerPoolBalancer.scala b/core/controller/src/main/scala/whisk/core/loadBalancer/ContainerPoolBalancer.scala
index dc771a7..193ed8d 100644
--- a/core/controller/src/main/scala/whisk/core/loadBalancer/ContainerPoolBalancer.scala
+++ b/core/controller/src/main/scala/whisk/core/loadBalancer/ContainerPoolBalancer.scala
@@ -185,11 +185,7 @@ class ContainerPoolBalancer(config: WhiskConfig, controllerInstance: InstanceId)
producer.send(topic, msg).andThen {
case Success(status) =>
- transid.finished(
- this,
- start,
- s"posted to ${status.topic()}[${status.partition()}][${status.offset()}]",
- logLevel = InfoLevel)
+ transid.finished(this, start, s"posted to ${status.topic()}[${status.partition()}][${status.offset()}]")
case Failure(e) => transid.failed(this, start, s"error on posting to topic $topic")
}
}
--
To stop receiving notification emails like this one, please contact
csantanapr@apache.org.