HOME/Articles/

Golang golang-log (snippet)

Article Outline

Go programming example 'golang-log'

golang-log

Golang beginners example: golang-log

package main

import (
    "log"
)

func main() {
    log.SetFlags(log.Ltime | log.Lshortfile)

    log.Println("first log output")
    log.Printf("second log output\n")
}