go1.20.5
GoThrough

log.LUTC

// These flags define which text to prefix to each log entry generated by the Logger. // Bits are or'ed together to control what's printed. // With the exception of the Lmsgprefix flag, there is no // control over the order they appear (the order listed here) // or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // // 2009/01/23 01:23:23 message // // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message const LUTC = iota

log.Ldate

// These flags define which text to prefix to each log entry generated by the Logger. // Bits are or'ed together to control what's printed. // With the exception of the Lmsgprefix flag, there is no // control over the order they appear (the order listed here) // or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // // 2009/01/23 01:23:23 message // // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message const Ldate = iota

log.Llongfile

// These flags define which text to prefix to each log entry generated by the Logger. // Bits are or'ed together to control what's printed. // With the exception of the Lmsgprefix flag, there is no // control over the order they appear (the order listed here) // or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // // 2009/01/23 01:23:23 message // // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message const Llongfile = iota

log.Lmicroseconds

// These flags define which text to prefix to each log entry generated by the Logger. // Bits are or'ed together to control what's printed. // With the exception of the Lmsgprefix flag, there is no // control over the order they appear (the order listed here) // or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // // 2009/01/23 01:23:23 message // // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message const Lmicroseconds = iota

log.Lmsgprefix

// These flags define which text to prefix to each log entry generated by the Logger. // Bits are or'ed together to control what's printed. // With the exception of the Lmsgprefix flag, there is no // control over the order they appear (the order listed here) // or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // // 2009/01/23 01:23:23 message // // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message const Lmsgprefix = iota

log.Lshortfile

// These flags define which text to prefix to each log entry generated by the Logger. // Bits are or'ed together to control what's printed. // With the exception of the Lmsgprefix flag, there is no // control over the order they appear (the order listed here) // or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // // 2009/01/23 01:23:23 message // // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message const Lshortfile = iota

log.LstdFlags

// These flags define which text to prefix to each log entry generated by the Logger. // Bits are or'ed together to control what's printed. // With the exception of the Lmsgprefix flag, there is no // control over the order they appear (the order listed here) // or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // // 2009/01/23 01:23:23 message // // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message const LstdFlags = Ldate | Ltime

log.Ltime

// These flags define which text to prefix to each log entry generated by the Logger. // Bits are or'ed together to control what's printed. // With the exception of the Lmsgprefix flag, there is no // control over the order they appear (the order listed here) // or the format they present (as described in the comments). // The prefix is followed by a colon only when Llongfile or Lshortfile // is specified. // For example, flags Ldate | Ltime (or LstdFlags) produce, // // 2009/01/23 01:23:23 message // // while flags Ldate | Ltime | Lmicroseconds | Llongfile produce, // // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message const Ltime = iota

log.Default

// Default returns the standard logger used by the package-level output functions. func Default() *Logger

log.Fatal

// Fatal is equivalent to Print() followed by a call to os.Exit(1). func Fatal(v ...any)

log.Fatalf

// Fatalf is equivalent to Printf() followed by a call to os.Exit(1). func Fatalf(format string, v ...any)

log.Fatalln

// Fatalln is equivalent to Println() followed by a call to os.Exit(1). func Fatalln(v ...any)

log.Flags

// Flags returns the output flags for the standard logger. // The flag bits are Ldate, Ltime, and so on. func Flags() int

log.New

// New creates a new Logger. The out variable sets the // destination to which log data will be written. // The prefix appears at the beginning of each generated log line, or // after the log header if the Lmsgprefix flag is provided. // The flag argument defines the logging properties. func New(out io.Writer, prefix string, flag int) *Logger

log.Output

// Output writes the output for a logging event. The string s contains // the text to print after the prefix specified by the flags of the // Logger. A newline is appended if the last character of s is not // already a newline. Calldepth is the count of the number of // frames to skip when computing the file name and line number // if Llongfile or Lshortfile is set; a value of 1 will print the details // for the caller of Output. func Output(calldepth int, s string) error

log.Panic

// Panic is equivalent to Print() followed by a call to panic(). func Panic(v ...any)

log.Panicf

// Panicf is equivalent to Printf() followed by a call to panic(). func Panicf(format string, v ...any)

log.Panicln

// Panicln is equivalent to Println() followed by a call to panic(). func Panicln(v ...any)

log.Prefix

// Prefix returns the output prefix for the standard logger. func Prefix() string

log.Print

// Print calls Output to print to the standard logger. // Arguments are handled in the manner of fmt.Print. func Print(v ...any)

log.Printf

// Printf calls Output to print to the standard logger. // Arguments are handled in the manner of fmt.Printf. func Printf(format string, v ...any)

log.Println

// Println calls Output to print to the standard logger. // Arguments are handled in the manner of fmt.Println. func Println(v ...any)

log.SetFlags

// SetFlags sets the output flags for the standard logger. // The flag bits are Ldate, Ltime, and so on. func SetFlags(flag int)

log.SetOutput

// SetOutput sets the output destination for the standard logger. func SetOutput(w io.Writer)

log.SetPrefix

// SetPrefix sets the output prefix for the standard logger. func SetPrefix(prefix string)

log.Writer

// Writer returns the output destination for the standard logger. func Writer() io.Writer