mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid changing max size
This commit is contained in:
parent
ed154053c8
commit
27f04a382a
|
@ -4,9 +4,8 @@ import ()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copying the original glog because it is missing several convenient methods.
|
Copying the original glog because it is missing several convenient methods.
|
||||||
1. change log file size limit to 180MB
|
1. use ToStderrAndLog() in the weed.go
|
||||||
2. use ToStderrAndLog() in the weed.go
|
2. remove nano time in log format
|
||||||
3. remove nano time in log format
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
func ToStderr() {
|
func ToStderr() {
|
||||||
|
|
|
@ -31,7 +31,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// MaxSize is the maximum size of a log file in bytes.
|
// 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.
|
// logDirs lists the candidate directories for new log files.
|
||||||
var logDirs []string
|
var logDirs []string
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"code.google.com/p/weed-fs/go/glog"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"code.google.com/p/weed-fs/go/glog"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
@ -43,6 +43,7 @@ func setExitStatus(n int) {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
glog.ToStderrAndLog()
|
glog.ToStderrAndLog()
|
||||||
|
glog.MaxSize = 1024 * 1024 * 32
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
flag.Usage = usage
|
flag.Usage = usage
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
Loading…
Reference in a new issue