There was an error while loading. Please reload this page.
1 parent 3fef065 commit 0baad4dCopy full SHA for 0baad4d
replication/binlogsyncer.go
@@ -52,6 +52,8 @@ type BinlogSyncerConfig struct {
52
// Use replication.Time structure for timestamp and datetime.
53
// We will use Local location for timestamp and UTC location for datatime.
54
ParseTime bool
55
+
56
+LogLevel string
57
}
58
59
// BinlogSyncer syncs binlog event from server.
@@ -76,6 +78,11 @@ type BinlogSyncer struct {
76
78
77
79
// NewBinlogSyncer creates the BinlogSyncer with cfg.
80
func NewBinlogSyncer(cfg *BinlogSyncerConfig) *BinlogSyncer {
81
+if cfg.LogLevel == "" {
82
+cfg.LogLevel = "info"
83
+}
84
+log.SetLevelByString(cfg.LogLevel)
85
86
log.Infof("create BinlogSyncer with config %v", cfg)
87
88
b := new(BinlogSyncer)
0 commit comments