This is a creation in Article, where the information may have evolved or changed.
The log of Docker is log.go under the Pkg/log path. Very simple:
1. Altogether 4 levels of debug,info, Error,fatal.
2. Info is output directly to stdout, and the others are output to stderr (including debug). Fatal output log will automatically exit
3. The actual output is the LOGF function. The Golang runtime Library is used, as follows
_, file,line, OK : =runtime. Caller(2)
4. Runtime. Caller ()
Func Caller (skip int) (PC UIntPtr, file string, line int, OK BOOL)
Skip if it is 0, returns the function name, file, program pointer that is currently calling the caller function, pc,1 is the previous function, and so on
5. Runtime. Breakpoint ()
Set breakpoints in the program (when not in use with the IDE), with GDB
Reference:
http://blog.studygolang.com/2012/12/gdb%E8%B0%83%E8%AF%95go%E7%A8%8B%E5%BA%8F/
http://golang.org/pkg/runtime/