Skip to content

Commit 1445b6e

Browse files
authored
Strip only trailing line ender from log lines produced by actions. (#4852)
Stripping both leading and trailing spaces will alter the formatting of the logs produced by actions. This changes the stripping only to trailing new line or return character.
1 parent fb6c779 commit 1445b6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/logging/DockerToActivationLogStore.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import spray.json._
3939
* Represents a single log line as read from a docker log
4040
*/
4141
protected[core] case class LogLine(time: String, stream: String, log: String) {
42-
def toFormattedString = f"$time%-30s $stream: ${log.trim}"
42+
def toFormattedString = f"$time%-30s $stream: ${log.stripLineEnd}"
4343
}
4444

4545
protected[core] object LogLine extends DefaultJsonProtocol {

0 commit comments

Comments
 (0)