comparison pkg/imports/sr.go @ 5561:b91716d2acc6

Fixed log message analyzing in log export.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 11 Feb 2022 18:57:11 +0100
parents f2204f91d286
children 5152b4db40cc
comparison
equal deleted inserted replaced
5560:f2204f91d286 5561:b91716d2acc6
251 ) 251 )
252 252
253 func compileRecoverRegs() { 253 func compileRecoverRegs() {
254 bottleneckRe = regexp.MustCompile(`Bottleneck:\s*(.+)\s*$`) 254 bottleneckRe = regexp.MustCompile(`Bottleneck:\s*(.+)\s*$`)
255 surveyTypeRe = regexp.MustCompile(`Processing as\s+([^\s]+)\s+beam scan.`) 255 surveyTypeRe = regexp.MustCompile(`Processing as\s+([^\s]+)\s+beam scan.`)
256 dateRe = regexp.MustCompile(`Survey date:\s*(\d{4}-\d{2}-\d{2}).`) 256 dateRe = regexp.MustCompile(`Survey date:\s*(\d{4}-\d{2}-\d{2})`)
257 negateZRe = regexp.MustCompile(`Z values will be negated.`) 257 negateZRe = regexp.MustCompile(`Z values will be negated\.`)
258 } 258 }
259 259
260 // Description gives a short info about relevant facts of this import. 260 // Description gives a short info about relevant facts of this import.
261 func (sr *SoundingResult) Description(msgs []string) (string, error) { 261 func (sr *SoundingResult) Description(msgs []string) (string, error) {
262 262
303 log.Debugf("date recovered: %s\n", date) 303 log.Debugf("date recovered: %s\n", date)
304 descs = append(descs, date) 304 descs = append(descs, date)
305 } 305 }
306 306
307 if sr.NegateZ != nil && *sr.NegateZ { 307 if sr.NegateZ != nil && *sr.NegateZ {
308 descs = append(descs, "negateZ")
308 } else if negZ != nil && *negZ { 309 } else if negZ != nil && *negZ {
309 log.Debugln("negateZ recovered") 310 log.Debugln("negateZ recovered")
310 descs = append(descs, "negateZ") 311 descs = append(descs, "negateZ")
311 } 312 }
312 313