Browse Source

avoid changing max size

pull/2/head
Chris Lu 12 years ago
parent
commit
27f04a382a
  1. 5
      go/glog/convenient_api.go
  2. 2
      go/glog/glog_file.go
  3. 5
      go/weed/weed.go

5
go/glog/convenient_api.go

@ -4,9 +4,8 @@ import ()
/*
Copying the original glog because it is missing several convenient methods.
1. change log file size limit to 180MB
2. use ToStderrAndLog() in the weed.go
3. remove nano time in log format
1. use ToStderrAndLog() in the weed.go
2. remove nano time in log format
*/
func ToStderr() {

2
go/glog/glog_file.go

@ -31,7 +31,7 @@ import (
)
// MaxSize is the maximum size of a log file in bytes.
var MaxSize uint64 = 1024 * 1024 * 180
var MaxSize uint64 = 1024 * 1024 * 1800
// logDirs lists the candidate directories for new log files.
var logDirs []string

5
go/weed/weed.go

@ -1,11 +1,11 @@
package main
import (
"code.google.com/p/weed-fs/go/glog"
"encoding/json"
"flag"
"fmt"
"io"
"code.google.com/p/weed-fs/go/glog"
"math/rand"
"net/http"
"os"
@ -42,7 +42,8 @@ func setExitStatus(n int) {
}
func main() {
glog.ToStderrAndLog()
glog.ToStderrAndLog()
glog.MaxSize = 1024 * 1024 * 32
rand.Seed(time.Now().UnixNano())
flag.Usage = usage
flag.Parse()

Loading…
Cancel
Save