netgusto/nodebook

Does not display last line if not terminated by newline when using docker

netgusto opened this issue · 0 comments

Currently, the last log line is not displayed if the output is not terminated by newline, when using docker toolchains.

This is probably due to the docker client buffering the log until the line is complete.

To reproduce, snippet in go:

package main

import "fmt"
import "time"

func main() {
	fmt.Println("Hello, World!")
    currentTimeMillis := time.Now().UnixNano() / int64(time.Millisecond)
    fmt.Printf("Current Time Millis: %d", currentTimeMillis)
}

Output may or may not contain last line:

Screenshot 2020-02-17 at 10 50 44