qiniu / logkit
Showing 1 of 1 files from the diff.

@@ -138,7 +138,7 @@
Loading
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,7 +243,7 @@
Loading
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,7 +278,7 @@
Loading
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,7 +416,7 @@
Loading
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,7 +439,7 @@
Loading
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,7 +472,7 @@
Loading
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,14 +640,14 @@
Loading
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,8 +678,8 @@
Loading
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,7 +725,7 @@
Loading
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,7 +735,7 @@
Loading
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,7 +796,7 @@
Loading
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
Files Coverage
conf 97.67%
mgr 66.26%
parser 87.13%
queue 74.13%
rateio 95.74%
reader 47.70%
router 54.13%
samples 100.00%
sender 44.98%
transforms 55.67%
utils 58.88%
audit/audit.go 73.63%
cleaner/cleaner.go 58.82%
cli/upgrade.go 47.56%
logkit.go 35.20%
self/logrunner.go 53.88%
times/times.go 91.30%
Project Totals (139 files) 56.94%
3985.1
TRAVIS_OS_NAME=linux
1.12.9=.12.9

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading