File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ func main() {
48
48
}
49
49
50
50
physicalIndexes := indexer .FindPhysicalIndexes (config .ElasticURL , config .Index )
51
+ log .WithField ("physicalIndexes" , physicalIndexes ).WithField ("index" , config .Index ).Info ("found physical indexes" )
51
52
physicalIndex := ""
52
53
if len (physicalIndexes ) > 0 {
53
54
physicalIndex = physicalIndexes [0 ]
@@ -58,8 +59,9 @@ func main() {
58
59
if physicalIndex == "" || config .Rebuild {
59
60
physicalIndex , err = indexer .CreateNewIndex (config .ElasticURL , config .Index )
60
61
if err != nil {
61
- log .Fatal (err )
62
+ log .WithError (err ). Fatal ( "error creating new index" )
62
63
}
64
+ log .WithField ("index" , config .Index ).WithField ("physicalIndex" , physicalIndex ).Info ("created new physical index" )
63
65
}
64
66
65
67
for {
@@ -96,6 +98,7 @@ func main() {
96
98
time .Sleep (time .Second * 5 )
97
99
physicalIndex = ""
98
100
physicalIndexes = indexer .FindPhysicalIndexes (config .ElasticURL , config .Index )
101
+ log .WithField ("physicalIndexes" , physicalIndexes ).WithField ("index" , config .Index ).Info ("found physical indexes" )
99
102
if len (physicalIndex ) > 0 {
100
103
physicalIndex = physicalIndexes [0 ]
101
104
}
You can’t perform that action at this time.
0 commit comments