No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
723f743
... +0 ...
fdfffe6
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
138 | 138 | // no need to lock here, nothing else could possibly be touching this instance |
|
139 | 139 | err := d.retrieveMetaData() |
|
140 | 140 | if err != nil { |
|
141 | - | log.Warnf("ERROR: diskqueue(%s) failed to retrieveMetaData - %s", d.name, err) |
|
141 | + | log.Warnf("ERROR: diskqueue(%s) failed to retrieveMetaData - %s", d.name, err.Error()) |
|
142 | 142 | } |
|
143 | 143 | ||
144 | 144 | go d.ioLoop() |
243 | 243 | ||
244 | 244 | innerErr := os.Remove(d.metaDataFileName()) |
|
245 | 245 | if innerErr != nil && !os.IsNotExist(innerErr) { |
|
246 | - | log.Warnf("ERROR: diskqueue(%s) failed to remove metadata file - %s", d.name, innerErr) |
|
246 | + | log.Warnf("ERROR: diskqueue(%s) failed to remove metadata file - %s", d.name, innerErr.Error()) |
|
247 | 247 | return innerErr |
|
248 | 248 | } |
|
249 | 249 |
278 | 278 | fn := d.fileName(i) |
|
279 | 279 | innerErr := os.Remove(fn) |
|
280 | 280 | if innerErr != nil && !os.IsNotExist(innerErr) { |
|
281 | - | log.Warnf("ERROR: diskqueue(%s) failed to remove data file - %s", d.name, innerErr) |
|
281 | + | log.Warnf("ERROR: diskqueue(%s) failed to remove data file - %s", d.name, innerErr.Error()) |
|
282 | 282 | err = innerErr |
|
283 | 283 | } |
|
284 | 284 | } |
416 | 416 | writer := rateio.NewRateWriter(d.writeFile, d.writeRateLimit) |
|
417 | 417 | _, err = io.Copy(writer, mr) |
|
418 | 418 | if err != nil { |
|
419 | - | log.Warn("io.Copy error -", err) |
|
419 | + | log.Warnf("io.Copy error - %s", err.Error()) |
|
420 | 420 | writer.Close() |
|
421 | 421 | d.writeFile.Close() |
|
422 | 422 | d.writeFile = nil |
439 | 439 | // sync every time we start writing to a new file |
|
440 | 440 | err = d.sync() |
|
441 | 441 | if err != nil { |
|
442 | - | log.Warnf("ERROR: diskqueue(%s) failed to sync - %s", d.name, err) |
|
442 | + | log.Warnf("ERROR: diskqueue(%s) failed to sync - %s", d.name, err.Error()) |
|
443 | 443 | } |
|
444 | 444 | ||
445 | 445 | // 关闭被滚动文件 |
472 | 472 | err := d.writeOne(msg) |
|
473 | 473 | if err != nil { |
|
474 | 474 | // FIXME: 需要一个合适的方案防止数据丢失 |
|
475 | - | log.Errorf("DISKQUEUE(%s): drop one msg from memory chan - %v", d.name, err) |
|
475 | + | log.Errorf("DISKQUEUE(%s): drop one msg from memory chan - %s", d.name, err.Error()) |
|
476 | 476 | } |
|
477 | 477 | default: |
|
478 | 478 | return |
640 | 640 | if utils.IsExist(fpath) { |
|
641 | 641 | fi, err := os.Stat(fpath) |
|
642 | 642 | if err != nil { |
|
643 | - | log.Warnf("ERROR: failed to stat file %q: %s", fpath, err) |
|
643 | + | log.Warnf("ERROR: failed to stat file %q: %s", fpath, err.Error()) |
|
644 | 644 | } else { |
|
645 | 645 | atomic.AddInt64(&d.currentDiskUsedBytes, -fi.Size()) |
|
646 | 646 | } |
|
647 | 647 | ||
648 | 648 | err = os.Remove(fpath) |
|
649 | 649 | if err != nil { |
|
650 | - | log.Warnf("ERROR: failed to remove file %q: %s", fpath, err) |
|
650 | + | log.Warnf("ERROR: failed to remove file %q: %s", fpath, err.Error()) |
|
651 | 651 | } |
|
652 | 652 | } |
|
653 | 653 | } |
678 | 678 | err := AtomicRename(badFn, badRenameFn) |
|
679 | 679 | if err != nil { |
|
680 | 680 | log.Warnf( |
|
681 | - | "ERROR: diskqueue(%s) failed to rename bad diskqueue file %s to %s", |
|
682 | - | d.name, badFn, badRenameFn) |
|
681 | + | "ERROR: diskqueue(%s) failed to rename bad diskqueue file %s to %s, error: %s", |
|
682 | + | d.name, badFn, badRenameFn, err.Error()) |
|
683 | 683 | } |
|
684 | 684 | ||
685 | 685 | d.readFileNum++ |
725 | 725 | if d.needSync { |
|
726 | 726 | err = d.sync() |
|
727 | 727 | if err != nil { |
|
728 | - | log.Warnf("ERROR: diskqueue(%s) failed to sync - %s", d.name, err) |
|
728 | + | log.Warnf("ERROR: diskqueue(%s) failed to sync - %s", d.name, err.Error()) |
|
729 | 729 | } |
|
730 | 730 | } |
|
731 | 731 |
735 | 735 | dataRead, err = d.readOne() |
|
736 | 736 | if err != nil { |
|
737 | 737 | log.Warnf("ERROR: reading from diskqueue(%s) at %d of %s - %s", |
|
738 | - | d.name, d.readPos, d.fileName(d.readFileNum), err) |
|
738 | + | d.name, d.readPos, d.fileName(d.readFileNum), err.Error()) |
|
739 | 739 | // NOTE: 根据 handleReadError() 的逻辑,只要读发生错误,就会调过当前这个文件,直接开始读下一个文件 |
|
740 | 740 | d.handleReadError() |
|
741 | 741 | continue |
796 | 796 | err = d.writeOne(dataRead) |
|
797 | 797 | if err != nil { |
|
798 | 798 | // FIXME: 需要一个合适的方案防止数据丢失 |
|
799 | - | log.Errorf("DISKQUEUE(%s): drop one msg from memory chan - %v", d.name, err) |
|
799 | + | log.Errorf("DISKQUEUE(%s): drop one msg from memory chan - %s", d.name, err.Error()) |
|
800 | 800 | } |
|
801 | 801 | } |
|
802 | 802 | break DONE |
Learn more Showing 6 files with coverage changes found.
reader/dirx/dir_reader.go
reader/tailx/tailx.go
reader/postgres/postgres.go
reader/dirx/dirx.go
mgr/mgr.go
reader/socket/socket.go
fdfffe6
723f743