Closed fopina closed 4 years ago
bingLoggingPipe prints empty line (even without timestamp) when printing stdout/stderr from function
I would expect empty lines to be ignored or properly timestamped to keep the line structure (for log collectors)
With this in a function handler:
fmt.Println("hello") fmt.Print(" there") fmt.Println(", world")
the function container output is
Forking - ./handler [] 2019/09/21 16:10:53 OperationalMode: http 2019/09/21 16:10:53 Started logging stderr from function. 2019/09/21 16:10:53 Started logging stdout from function. 2019/09/21 16:10:53 Writing lock-file to: /tmp/.lock 2019/09/21 16:10:53 Metrics server. Port: 8081 2019/09/21 16:12:01 stdout: hello 2019/09/21 16:12:01 stdout: there 2019/09/21 16:12:01 stdout: , world
(2 blank lines due to \r\n of the Println)
\r\n
Println
Right-strip scanner.Text()?
scanner.Text()
Provided in Current behaviour
Current behaviour
invalid issue, sorry. noticed I was using 0.5.3 in my template after opening this, tested with 0.7.2 and all good!
bingLoggingPipe prints empty line (even without timestamp) when printing stdout/stderr from function
Expected Behaviour
I would expect empty lines to be ignored or properly timestamped to keep the line structure (for log collectors)
Current Behaviour
With this in a function handler:
the function container output is
(2 blank lines due to
\r\n
of thePrintln
)Possible Solution
Right-strip
scanner.Text()
?Steps to Reproduce (for bugs)
Provided in
Current behaviour