@@ -27,7 +27,6 @@ import (
27
27
"k8s.io/node-problem-detector/pkg/problemmetrics"
28
28
"k8s.io/node-problem-detector/pkg/systemlogmonitor/logwatchers"
29
29
watchertypes "k8s.io/node-problem-detector/pkg/systemlogmonitor/logwatchers/types"
30
- logtypes "k8s.io/node-problem-detector/pkg/systemlogmonitor/types"
31
30
systemlogtypes "k8s.io/node-problem-detector/pkg/systemlogmonitor/types"
32
31
"k8s.io/node-problem-detector/pkg/types"
33
32
"k8s.io/node-problem-detector/pkg/util"
@@ -50,7 +49,7 @@ type logMonitor struct {
50
49
buffer LogBuffer
51
50
config MonitorConfig
52
51
conditions []types.Condition
53
- logCh <- chan * logtypes .Log
52
+ logCh <- chan * systemlogtypes .Log
54
53
output chan * types.Status
55
54
tomb * tomb.Tomb
56
55
}
@@ -147,7 +146,7 @@ func (l *logMonitor) monitorLoop() {
147
146
}
148
147
149
148
// parseLog parses one log line.
150
- func (l * logMonitor ) parseLog (log * logtypes .Log ) {
149
+ func (l * logMonitor ) parseLog (log * systemlogtypes .Log ) {
151
150
// Once there is new log, log monitor will push it into the log buffer and try
152
151
// to match each rule. If any rule is matched, log monitor will report a status.
153
152
l .buffer .Push (log )
@@ -163,7 +162,7 @@ func (l *logMonitor) parseLog(log *logtypes.Log) {
163
162
}
164
163
165
164
// generateStatus generates status from the logs.
166
- func (l * logMonitor ) generateStatus (logs []* logtypes .Log , rule systemlogtypes.Rule ) * types.Status {
165
+ func (l * logMonitor ) generateStatus (logs []* systemlogtypes .Log , rule systemlogtypes.Rule ) * types.Status {
167
166
// We use the timestamp of the first log line as the timestamp of the status.
168
167
timestamp := logs [0 ].Timestamp
169
168
message := generateMessage (logs )
@@ -251,7 +250,7 @@ func initialConditions(defaults []types.Condition) []types.Condition {
251
250
return conditions
252
251
}
253
252
254
- func generateMessage (logs []* logtypes .Log ) string {
253
+ func generateMessage (logs []* systemlogtypes .Log ) string {
255
254
messages := []string {}
256
255
for _ , log := range logs {
257
256
messages = append (messages , log .Message )
0 commit comments