qiniu / logkit

Compare 723f743 ... +0 ... fdfffe6

Coverage Reach
reader/sql/dataconvert.go reader/sql/records.go reader/sql/meta.go reader/sql/utils.go reader/sql/time.go reader/sql/magic.go reader/sql/compare.go reader/sql/sortdata.go reader/mysql/mysql.go reader/mysql/mysqloffset.go reader/tailx/tailx.go reader/postgres/postgres.go reader/postgres/mongooffset.go reader/postgres/time.go reader/snmp/snmp.go reader/dirx/dirx.go reader/dirx/dir_reader.go reader/seqfile/seqfile.go reader/meta.go reader/bufreader/bufreader.go reader/bufreader/linecache.go reader/elastic/elastic.go reader/cloudtrail/cloudtrail.go reader/socket/socket.go reader/extract/reader.go reader/singlefile/singlefile.go reader/mongo/mongo.go reader/httpfetch/http_fetch.go reader/redis/redis.go reader/script/script.go reader/utils.go reader/kafka/kafka.go reader/http/http.go reader/autofile/autofile.go reader/reader.go transforms/mutate/convert.go transforms/mutate/xml.go transforms/mutate/arrayexpand.go transforms/mutate/script.go transforms/mutate/substring.go transforms/mutate/urlparam.go transforms/mutate/mapreplace.go transforms/mutate/urlconvert.go transforms/mutate/case.go transforms/mutate/timestamp.go transforms/mutate/keyvalue.go transforms/mutate/json.go transforms/mutate/copy.go transforms/mutate/replace.go transforms/mutate/filter.go transforms/mutate/discard.go transforms/mutate/split.go transforms/mutate/trim.go transforms/mutate/concat.go transforms/mutate/label.go transforms/mutate/rename.go transforms/mutate/pick.go transforms/mutate/pandorakey_convert.go transforms/ip/ip.go transforms/ip/number2ip.go transforms/ip/datx.go transforms/ip/dat.go transforms/ip/locator.go transforms/ip/mmdb.go transforms/apps/redis.go transforms/apps/tode.go transforms/ua/ua.go transforms/service/k8stag.go transforms/date/date.go transforms/aws/cloudtrail.go mgr/runner.go mgr/mgr.go mgr/cluster.go mgr/metric_runner.go mgr/dataflow.go mgr/rest.go mgr/models.go mgr/api_sender.go mgr/api_parser.go mgr/api_transformer.go mgr/api_reader.go mgr/api_metric.go mgr/api_cleaner.go sender/pandora/pandora.go sender/fault_tolerant.go sender/open_falcon/transfer.go sender/http/http.go sender/file/file.go sender/file/writer.go sender/csv/csv.go sender/sqlfile/sqlfile.go sender/mysql/mysql.go sender/sender.go parser/csv/csv.go parser/qiniu/qiniu.go parser/nginx/nginx.go parser/grok/grok.go parser/kafkarest/kafkarest.go parser/syslog/syslog.go parser/json/json.go parser/mysql/mysql.go parser/linuxaudit/audit.go parser/logfmt/logfmt.go parser/parser.go parser/raw/raw.go parser/utils.go utils/models/utils.go utils/models/models.go utils/models/code.go utils/parse/linuxaudit/linuxaudit.go utils/parse/syslog/syslog.go utils/parse/mutate/keyvalue.go utils/utils.go utils/equeue/queue.go utils/os/utils_linux.go utils/os/utils_unix.go utils/os/utils_common.go utils/os/signal.go utils/magic/magic.go utils/mongo.go utils/timetracker.go queue/disk.go queue/direct.go queue/utils.go conf/map_conf.go conf/load_conf.go cli/upgrade.go self/logrunner.go logkit.go cleaner/cleaner.go router/sender_router.go router/rest_router_models.go rateio/controller.go rateio/writer.go rateio/reader.go audit/audit.go times/times.go samples/sender.go samples/parser.go

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

Learn more about Codecov Flags here.

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

Learn more Showing 6 files with coverage changes found.

Changes in reader/dirx/dir_reader.go
-4
+2
+2
Loading file...
Changes in reader/tailx/tailx.go
-7
+7
Loading file...
Changes in reader/postgres/postgres.go
-2
+1
+1
Loading file...
Changes in reader/dirx/dirx.go
-1
+1
Loading file...
Changes in mgr/mgr.go
-2
-3
+5
Loading file...
Changes in reader/socket/socket.go
-6
+6
Loading file...
Files Coverage
direct.go 69.23%
disk.go 74.60%
utils.go 100.00%
Folder Totals (3 files) 74.13%
Project Totals (139 files) 56.94%
Loading