Skip to content

Commit f8d1a29

Browse files
authored
Merge pull request #383 from YangSen-qn/V8.1.1
优化日志统计
2 parents 8c893b6 + 69bba5d commit f8d1a29

27 files changed

+290
-23
lines changed

.github/workflows/ci-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
on: [push]
1+
on:
2+
push:
3+
paths-ignore:
4+
- '**.md'
5+
pull_request:
6+
paths-ignore:
7+
- '**.md'
28
name: Run Test Cases
39
jobs:
410
test-on-mac:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#Changelog
2+
## 8.1.1(2021-01-06)
3+
## 优化
4+
- 优化日志统计
5+
26
## 8.1.0(2020-12-29)
37
## 增加
48
- 支持分片V2

Qiniu.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Qiniu'
3-
s.version = '8.1.0'
3+
s.version = '8.1.1'
44
s.summary = 'Qiniu Resource Storage SDK for iOS and Mac'
55
s.homepage = 'https://github.com/qiniu/objc-sdk'
66
s.social_media_url = 'http://weibo.com/qiniutek'

QiniuDemo/QiniuDemo/ViewController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//
88

99
#import "Configure.h" // 测试参数配置,暂时只有token,可删除
10-
1110
#import "ViewController.h"
1211
#import "QNTransactionManager.h"
1312

@@ -34,6 +33,8 @@ @implementation ViewController
3433

3534
- (void)viewDidLoad {
3635
[super viewDidLoad];
36+
[QNLogUtil setLogLevel:QNLogLevelInfo];
37+
3738
// Do any additional setup after loading the view, typically from a nib.
3839
[self changeUploadState:UploadStatePrepare];
3940
self.title = @"七牛云上传";

QiniuSDK.xcodeproj/project.pbxproj

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@
195195
31C2EEEC242DEF6A00713A33 /* QNUtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 31C2EEEB242DEF6A00713A33 /* QNUtilTest.m */; };
196196
31C2EEED242DEF6A00713A33 /* QNUtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 31C2EEEB242DEF6A00713A33 /* QNUtilTest.m */; };
197197
31C6E68824ECC75700633629 /* NSData+QNGZip.m in Sources */ = {isa = PBXBuildFile; fileRef = 31259E3124E3D02C00CF7531 /* NSData+QNGZip.m */; };
198+
31CBB0F92595F2720089C795 /* QNLogUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 31CBB0F72595F2720089C795 /* QNLogUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
199+
31CBB0FA2595F2720089C795 /* QNLogUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 31CBB0F72595F2720089C795 /* QNLogUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
200+
31CBB0FB2595F2720089C795 /* QNLogUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 31CBB0F82595F2720089C795 /* QNLogUtil.m */; };
201+
31CBB0FC2595F2720089C795 /* QNLogUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 31CBB0F82595F2720089C795 /* QNLogUtil.m */; };
198202
31D8446A254017BD005C0222 /* QNErrorCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D84468254017BD005C0222 /* QNErrorCode.h */; settings = {ATTRIBUTES = (Public, ); }; };
199203
31D8446B254017BD005C0222 /* QNErrorCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 31D84469254017BD005C0222 /* QNErrorCode.m */; };
200204
31D8446C254017BD005C0222 /* QNErrorCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 31D84469254017BD005C0222 /* QNErrorCode.m */; };
@@ -412,6 +416,8 @@
412416
31C2EEE1242DE86300713A33 /* QNUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNUtils.h; sourceTree = "<group>"; };
413417
31C2EEE2242DE86300713A33 /* QNUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNUtils.m; sourceTree = "<group>"; };
414418
31C2EEEB242DEF6A00713A33 /* QNUtilTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNUtilTest.m; sourceTree = "<group>"; };
419+
31CBB0F72595F2720089C795 /* QNLogUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNLogUtil.h; sourceTree = "<group>"; };
420+
31CBB0F82595F2720089C795 /* QNLogUtil.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNLogUtil.m; sourceTree = "<group>"; };
415421
31D84468254017BD005C0222 /* QNErrorCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNErrorCode.h; sourceTree = "<group>"; };
416422
31D84469254017BD005C0222 /* QNErrorCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNErrorCode.m; sourceTree = "<group>"; };
417423
31DD31D524971BD7004BFDDE /* QNUploadFileNameTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNUploadFileNameTest.m; sourceTree = "<group>"; };
@@ -617,6 +623,8 @@
617623
4551E56624D0065100447285 /* NSData+MD5.m */,
618624
31A070142501E27B0067D718 /* QNDefine.h */,
619625
31A070152501E27B0067D718 /* QNDefine.m */,
626+
31CBB0F72595F2720089C795 /* QNLogUtil.h */,
627+
31CBB0F82595F2720089C795 /* QNLogUtil.m */,
620628
);
621629
path = Utils;
622630
sourceTree = "<group>";
@@ -937,6 +945,7 @@
937945
313B380D2575E49400FBB57B /* QNPartsUploadPerformer.h in Headers */,
938946
318E2F092552AE1C004EDE8C /* QNTransactionManager.h in Headers */,
939947
318E2F182552AE2B004EDE8C /* QNHttpRegionRequest.h in Headers */,
948+
31CBB0FA2595F2720089C795 /* QNLogUtil.h in Headers */,
940949
318E2F062552AE05004EDE8C /* NSObject+QNSwizzle.h in Headers */,
941950
318E2EF42552ADD1004EDE8C /* QNReportItem.h in Headers */,
942951
313B37EF2574F00200FBB57B /* QNPartsUploadPerformerV1.h in Headers */,
@@ -1043,6 +1052,7 @@
10431052
31F553D024597182000B66AD /* QNHttpSingleRequest.h in Headers */,
10441053
CC2513C42455C141003F4C65 /* QNTempFile.h in Headers */,
10451054
3149A1D324626B3100A2A15B /* QNUploadSystemClient.h in Headers */,
1055+
31CBB0F92595F2720089C795 /* QNLogUtil.h in Headers */,
10461056
31F553C02457FFB0000B66AD /* QNPipeline.h in Headers */,
10471057
31F553E4245A6986000B66AD /* QNRequestTransaction.h in Headers */,
10481058
DFA9B64919E0018800A15FD1 /* QNUploadOption.h in Headers */,
@@ -1140,7 +1150,7 @@
11401150
DF2CDDF719DAC05500CE01FB /* Project object */ = {
11411151
isa = PBXProject;
11421152
attributes = {
1143-
LastUpgradeCheck = 1140;
1153+
LastUpgradeCheck = 1220;
11441154
ORGANIZATIONNAME = Qiniu;
11451155
TargetAttributes = {
11461156
31259E4624E63B9700CF7531 = {
@@ -1323,7 +1333,6 @@
13231333
31A1841B246A8C77001D6EEE /* QNUploadRequestMetrics.m in Sources */,
13241334
451A36B724BD893D00754A15 /* QNReportConfig.m in Sources */,
13251335
313B37F62574F00F00FBB57B /* QNPartsUploadPerformerV2.m in Sources */,
1326-
31C2EECD242CC52600713A33 /* QNDnsCacheInfo.m in Sources */,
13271336
31BAA279243DB83700B7E883 /* QNURLProtocol.m in Sources */,
13281337
313B380E2575E49400FBB57B /* QNPartsUploadPerformer.m in Sources */,
13291338
31F553A32456F2F3000B66AD /* QNFile.m in Sources */,
@@ -1358,6 +1367,7 @@
13581367
3149A1DD2462A57400A2A15B /* QNUploadDomainRegion.m in Sources */,
13591368
31C2EEE4242DE86300713A33 /* QNUtils.m in Sources */,
13601369
31FD0920248662F900217848 /* QNUploadServerFreezeManager.m in Sources */,
1370+
31CBB0FB2595F2720089C795 /* QNLogUtil.m in Sources */,
13611371
);
13621372
runOnlyForDeploymentPostprocessing = 0;
13631373
};
@@ -1413,6 +1423,7 @@
14131423
31C6E68824ECC75700633629 /* NSData+QNGZip.m in Sources */,
14141424
31A070182501E27B0067D718 /* QNDefine.m in Sources */,
14151425
31BAA280243DBE6200B7E883 /* QNURLProtocol.m in Sources */,
1426+
31CBB0FC2595F2720089C795 /* QNLogUtil.m in Sources */,
14161427
DF293CA019DBC2AE00799011 /* QNUserAgent.m in Sources */,
14171428
314944592446FF4700386F16 /* QNCFHttpClient.m in Sources */,
14181429
31C2EED7242CC52600713A33 /* QNDnsCacheFile.m in Sources */,
@@ -1620,6 +1631,7 @@
16201631
buildSettings = {
16211632
COMBINE_HIDPI_IMAGES = YES;
16221633
COPY_PHASE_STRIP = NO;
1634+
"EXCLUDED_ARCHS[sdk=*]" = arm64;
16231635
GCC_DYNAMIC_NO_PIC = NO;
16241636
GCC_OPTIMIZATION_LEVEL = 0;
16251637
PRODUCT_NAME = QiniuSDK_Mac;
@@ -1633,6 +1645,7 @@
16331645
COMBINE_HIDPI_IMAGES = YES;
16341646
COPY_PHASE_STRIP = YES;
16351647
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1648+
"EXCLUDED_ARCHS[sdk=*]" = arm64;
16361649
PRODUCT_NAME = QiniuSDK_Mac;
16371650
};
16381651
name = Release;

QiniuSDK.xcodeproj/xcshareddata/xcschemes/QiniuSDK_Mac.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1140"
3+
LastUpgradeVersion = "1220"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

QiniuSDK.xcodeproj/xcshareddata/xcschemes/QiniuSDK_MacTests.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1140"
3+
LastUpgradeVersion = "1220"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

QiniuSDK.xcodeproj/xcshareddata/xcschemes/QiniuSDK_iOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1140"
3+
LastUpgradeVersion = "1220"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

QiniuSDK.xcodeproj/xcshareddata/xcschemes/QiniuSDK_iOSTests.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1140"
3+
LastUpgradeVersion = "1220"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

QiniuSDK/Collect/QNReportItem.h

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,19 @@ extern NSString *const QNReportRequestKeyOsVersion;
8282
extern NSString *const QNReportRequestKeySDKName;
8383
extern NSString *const QNReportRequestKeySDKVersion;
8484
extern NSString *const QNReportRequestKeyClientTime;
85+
extern NSString *const QNReportRequestKeyHttpClient;
8586
extern NSString *const QNReportRequestKeyNetworkType;
8687
extern NSString *const QNReportRequestKeySignalStrength;
87-
extern NSString * const QNReportRequestKeyPrefetchedDnsSource;
88-
extern NSString * const QNReportRequestKeyPrefetchedBefore;
89-
extern NSString * const QNReportRequestKeyPrefetchedErrorMessage;
88+
extern NSString *const QNReportRequestKeyPrefetchedDnsSource;
89+
extern NSString *const QNReportRequestKeyPrefetchedBefore;
90+
extern NSString *const QNReportRequestKeyPrefetchedErrorMessage;
9091

9192

9293
//MARK:-- 分块上传统计⽇志
9394
extern NSString *const QNReportBlockKeyLogType;
9495
extern NSString *const QNReportBlockKeyUpTime;
96+
extern NSString *const QNReportBlockKeyTargetBucket;
97+
extern NSString *const QNReportBlockKeyTargetKey;
9598
extern NSString *const QNReportBlockKeyTargetRegionId;
9699
extern NSString *const QNReportBlockKeyCurrentRegionId;
97100
extern NSString *const QNReportBlockKeyTotalElapsedTime;
@@ -102,7 +105,10 @@ extern NSString *const QNReportBlockKeyPid;
102105
extern NSString *const QNReportBlockKeyTid;
103106
extern NSString *const QNReportBlockKeyUpApiVersion;
104107
extern NSString *const QNReportBlockKeyClientTime;
105-
108+
extern NSString *const QNReportBlockKeyOsName;
109+
extern NSString *const QNReportBlockKeyOsVersion;
110+
extern NSString *const QNReportBlockKeySDKName;
111+
extern NSString *const QNReportBlockKeySDKVersion;
106112

107113
//MARK:-- 上传质量统计
108114
extern NSString *const QNReportQualityKeyLogType;
@@ -115,7 +121,12 @@ extern NSString *const QNReportQualityKeyRequestsCount;
115121
extern NSString *const QNReportQualityKeyRegionsCount;
116122
extern NSString *const QNReportQualityKeyBytesSent;
117123
extern NSString *const QNReportQualityKeyCloudType;
118-
extern NSString * const QNReportQualityKeyErrorType;
119-
extern NSString * const QNReportQualityKeyErrorDescription;
124+
extern NSString *const QNReportQualityKeyErrorType;
125+
extern NSString *const QNReportQualityKeyErrorDescription;
126+
extern NSString *const QNReportQualityKeyOsName;
127+
extern NSString *const QNReportQualityKeyOsVersion;
128+
extern NSString *const QNReportQualityKeySDKName;
129+
extern NSString *const QNReportQualityKeySDKVersion;
130+
120131

121132
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)