--help
$ ./glog --help
Usage of ./glog:
-alsologtostderr=false: log to standard error as well as files
-log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
-log_dir="": If non-empty, write log files in this directory
-logtostderr=false: log to standard error instead of files
-stderrthreshold=0: logs at or above this threshold go to stderr
-v=0: log level for V logs
-vmodule=: comma-separated list of pattern=N settings for file-filtered logging
-logtostderr
$ ./glog -logtostderr
I0720 11:05:38.503918 25749 main.go:12] info v1
E0720 11:05:38.504035 25749 main.go:13] error v1
I0720 11:05:38.504043 25749 foo.go:8] info v1
E0720 11:05:38.504049 25749 foo.go:9] error v1
-vmodule=foo=2
$ ./glog -logtostderr -vmodule=foo=2
I0720 11:07:04.466255 25795 main.go:12] info v1
E0720 11:07:04.466354 25795 main.go:13] error v1
I0720 11:07:04.466366 25795 foo.go:8] info v1
E0720 11:07:04.466372 25795 foo.go:9] error v1
I0720 11:07:04.466378 25795 foo.go:11] info v2
-log_dir="."
$ ./glog -log_dir="."
E0720 13:41:21.245751 26875 main.go:12] error v1
E0720 13:41:21.246226 26875 foo.go:9] error v1
$ ls
glog
glog.Mac.atotto.log.ERROR.20130720-134121.26875
glog.Mac.atotto.log.INFO.20130720-134121.26875
glog.Mac.atotto.log.WARNING.20130720-134121.26875
glog.ERROR
glog.INFO
glog.WARNING
foo.go
main.go
example for glog.
glog : https://github.com/golang/glog
my blog : http://atotto.hatenadiary.jp/entry/2013/07/20/154439 (Japanese)