mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 11:09:12 +08:00
adding instructions on how to use logging
This commit is contained in:
parent
931bf2a50a
commit
963023898e
@ -389,7 +389,7 @@ type flushSyncWriter interface {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
flag.BoolVar(&logging.toStderr, "logtostderr", false, "log to standard error instead of files")
|
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.verbosity, "v", "log level for V logs")
|
||||||
flag.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr")
|
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")
|
flag.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging")
|
||||||
|
@ -45,7 +45,6 @@ func setExitStatus(n int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
glog.ToStderrAndLog()
|
|
||||||
glog.MaxSize = 1024 * 1024 * 32
|
glog.MaxSize = 1024 * 1024 * 32
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
flag.Usage = usage
|
flag.Usage = usage
|
||||||
@ -89,7 +88,8 @@ func main() {
|
|||||||
exit()
|
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:
|
Usage:
|
||||||
|
|
||||||
@ -132,6 +132,8 @@ func printUsage(w io.Writer) {
|
|||||||
|
|
||||||
func usage() {
|
func usage() {
|
||||||
printUsage(os.Stderr)
|
printUsage(os.Stderr)
|
||||||
|
fmt.Fprintf(os.Stderr, "For Logging, use \"weed [logging_options] [command]\". The logging options are:\n")
|
||||||
|
flag.PrintDefaults()
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user