Simple Logging



examples/logging/logger.go
package main

import (
    "log"
)

func main() {
    log.Print("First log")
    log.Print("Each log line is on its own")
    log.Println("Despite its name it does not add any extra newline")
    log.Printf("Value: %v seen", 42)
}

examples/logging/logger.out
2020/04/10 08:49:05 First log
2020/04/10 08:49:05 Each log line is on its own
2020/04/10 08:49:05 Despite its name it does not add any extra newline
2020/04/10 08:49:05 Value: 42 seen