change log name suffix format

This commit is contained in:
siddontang 2014-06-03 16:19:39 +08:00
parent 654a0a4704
commit 0d4949f060
3 changed files with 3 additions and 1 deletions

View File

@ -51,6 +51,7 @@ func (cfg *BinLogConfig) adjust() {
cfg.IndexName = "ledis"
}
//binlog not care space limit
cfg.SpaceLimit = -1
cfg.LogType = "bin"

View File

@ -145,7 +145,7 @@ func (l *Log) loadIndex() error {
}
func (l *Log) getLogFile() string {
return fmt.Sprintf("%s-%s.%05d", l.cfg.BaseName, l.cfg.LogType, l.lastLogIndex)
return fmt.Sprintf("%s-%s.%07d", l.cfg.BaseName, l.cfg.LogType, l.lastLogIndex)
}
func (l *Log) openNewLogFile() error {

View File

@ -28,6 +28,7 @@ func (cfg *RelayLogConfig) adjust() {
cfg.IndexName = "ledis"
}
//relaylog not care file num
cfg.MaxFileNum = -1
cfg.LogType = "relay"
}