diff options
| author | Chris Lu <chris.lu@gmail.com> | 2014-04-13 10:18:10 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2014-04-13 10:18:10 -0700 |
| commit | 963023898e6fba893932c55fc9c39c5b96021a07 (patch) | |
| tree | 744b03c214fd02741dde62ece963b9320f4ff27e | |
| parent | 931bf2a50a020658244f1b1a342a9becaa2a7770 (diff) | |
| download | seaweedfs-963023898e6fba893932c55fc9c39c5b96021a07.tar.xz seaweedfs-963023898e6fba893932c55fc9c39c5b96021a07.zip | |
adding instructions on how to use logging
| -rw-r--r-- | go/glog/glog.go | 2 | ||||
| -rw-r--r-- | go/weed/weed.go | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/go/glog/glog.go b/go/glog/glog.go index d18c6f7bb..68cdaede0 100644 --- a/go/glog/glog.go +++ b/go/glog/glog.go @@ -389,7 +389,7 @@ type flushSyncWriter interface { func init() { flag.BoolVar(&logging.toStderr, "logtostderr", false, "log to standard error instead of files") - flag.BoolVar(&logging.alsoToStderr, "alsologtostderr", false, "log to standard error as well as files") + flag.BoolVar(&logging.alsoToStderr, "alsologtostderr", true, "log to standard error as well as files") flag.Var(&logging.verbosity, "v", "log level for V logs") flag.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr") flag.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging") diff --git a/go/weed/weed.go b/go/weed/weed.go index 441ac9e61..418d89276 100644 --- a/go/weed/weed.go +++ b/go/weed/weed.go @@ -45,7 +45,6 @@ func setExitStatus(n int) { } func main() { - glog.ToStderrAndLog() glog.MaxSize = 1024 * 1024 * 32 rand.Seed(time.Now().UnixNano()) flag.Usage = usage @@ -89,7 +88,8 @@ func main() { exit() } -var usageTemplate = `WeedFS is a software to store billions of files and serve them fast! +var usageTemplate = ` +Weed File System : store billions of files and serve them fast! Usage: @@ -132,6 +132,8 @@ func printUsage(w io.Writer) { func usage() { printUsage(os.Stderr) + fmt.Fprintf(os.Stderr, "For Logging, use \"weed [logging_options] [command]\". The logging options are:\n") + flag.PrintDefaults() os.Exit(2) } |
