Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit a2a8864

Browse files
SynapticloopSynapticloop
authored andcommitted
added clarity to BaseB2Response Logging
1 parent 5047b8b commit a2a8864

12 files changed

+60
-27
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ And now for the dependency
226226
<dependency>
227227
<groupId>synapticloop</groupId>
228228
<artifactId>backblaze-b2-java-api</artifactId>
229-
<version>v1.2.6</version>
229+
<version>v1.2.7</version>
230230
<type>jar</type>
231231
</dependency>
232232
```
@@ -256,19 +256,19 @@ and then include the dependency:
256256

257257
```
258258
dependencies {
259-
runtime(group: 'synapticloop', name: 'backblaze-b2-java-api', version: 'v1.2.6', ext: 'jar')
259+
runtime(group: 'synapticloop', name: 'backblaze-b2-java-api', version: 'v1.2.7', ext: 'jar')
260260
261-
compile(group: 'synapticloop', name: 'backblaze-b2-java-api', version: 'v1.2.6', ext: 'jar')
261+
compile(group: 'synapticloop', name: 'backblaze-b2-java-api', version: 'v1.2.7', ext: 'jar')
262262
}
263263
```
264264

265265
or, more simply for versions of gradle greater than 2.4
266266

267267
```
268268
dependencies {
269-
runtime 'synapticloop:backblaze-b2-java-api:v1.2.6'
269+
runtime 'synapticloop:backblaze-b2-java-api:v1.2.7'
270270
271-
compile 'synapticloop:backblaze-b2-java-api:v1.2.6'
271+
compile 'synapticloop:backblaze-b2-java-api:v1.2.7'
272272
}
273273
```
274274

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ group = 'synapticloop'
1313
archivesBaseName = 'backblaze-b2-java-api'
1414
description = """A java api for the truly excellent backblaze b2 storage service"""
1515

16-
version = 'v1.2.6'
16+
version = 'v1.2.7'
1717

1818
sourceCompatibility = 1.7
1919
targetCompatibility = 1.7

src/main/java/synapticloop/b2/response/B2AuthorizeAccountResponse.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public B2AuthorizeAccountResponse(String json) throws B2ApiException {
6363
this.downloadUrl = this.readString(B2ResponseProperties.KEY_DOWNLOAD_URL);
6464
this.minimumPartSize = this.readInt(B2ResponseProperties.KEY_MINIMUM_PART_SIZE);
6565

66-
this.warnOnMissedKeys(LOGGER);
66+
this.warnOnMissedKeys();
6767
}
6868

6969
/**
@@ -105,6 +105,9 @@ public B2AuthorizeAccountResponse(String json) throws B2ApiException {
105105
*/
106106
public int getMinimumPartSize() {return this.minimumPartSize; }
107107

108+
@Override
109+
protected Logger getLogger() { return LOGGER; }
110+
108111
@Override
109112
public String toString() {
110113
StringBuilder stringBuilder = new StringBuilder();

src/main/java/synapticloop/b2/response/B2BucketResponse.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.json.JSONObject;
2020
import org.slf4j.Logger;
2121
import org.slf4j.LoggerFactory;
22+
2223
import synapticloop.b2.BucketType;
2324
import synapticloop.b2.exception.B2ApiException;
2425

@@ -45,7 +46,7 @@ public B2BucketResponse(String json) throws B2ApiException {
4546
this.bucketName = this.readString(B2ResponseProperties.KEY_BUCKET_NAME);
4647
this.bucketType = this.readString(B2ResponseProperties.KEY_BUCKET_TYPE);
4748

48-
this.warnOnMissedKeys(LOGGER);
49+
this.warnOnMissedKeys();
4950
}
5051

5152
/**
@@ -63,7 +64,7 @@ public B2BucketResponse(final JSONObject response) throws B2ApiException {
6364
this.bucketName = this.readString(B2ResponseProperties.KEY_BUCKET_NAME);
6465
this.bucketType = this.readString(B2ResponseProperties.KEY_BUCKET_TYPE);
6566

66-
this.warnOnMissedKeys(LOGGER);
67+
this.warnOnMissedKeys();
6768
}
6869

6970
/**
@@ -94,6 +95,9 @@ public B2BucketResponse(final JSONObject response) throws B2ApiException {
9495
*/
9596
public BucketType getBucketType() { return BucketType.valueOf(this.bucketType); }
9697

98+
@Override
99+
protected Logger getLogger() { return LOGGER; }
100+
97101
@Override
98102
public String toString() {
99103
final StringBuilder sb = new StringBuilder("B2BucketResponse{");

src/main/java/synapticloop/b2/response/B2DeleteFileVersionResponse.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public B2DeleteFileVersionResponse(String json) throws B2ApiException {
5757
this.fileId = this.readString(B2ResponseProperties.KEY_FILE_ID);
5858
this.fileName = this.readString(B2ResponseProperties.KEY_FILE_NAME);
5959

60-
this.warnOnMissedKeys(LOGGER);
60+
this.warnOnMissedKeys();
6161
}
6262

6363
/**
@@ -74,6 +74,9 @@ public B2DeleteFileVersionResponse(String json) throws B2ApiException {
7474
*/
7575
public String getFileName() { return this.fileName; }
7676

77+
@Override
78+
protected Logger getLogger() { return LOGGER; }
79+
7780
@Override
7881
public String toString() {
7982
final StringBuilder sb = new StringBuilder("B2DeleteFileVersionResponse{");

src/main/java/synapticloop/b2/response/B2FileInfoResponse.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public B2FileInfoResponse(final JSONObject response) throws B2ApiException {
7878
this.size = this.readInt(B2ResponseProperties.KEY_SIZE);
7979
this.uploadTimestamp = this.readLong(B2ResponseProperties.KEY_UPLOAD_TIMESTAMP);
8080

81-
this.warnOnMissedKeys(LOGGER);
81+
this.warnOnMissedKeys();
8282
}
8383

8484
/**
@@ -138,6 +138,9 @@ public B2FileInfoResponse(final JSONObject response) throws B2ApiException {
138138
*/
139139
public long getUploadTimestamp() { return this.uploadTimestamp; }
140140

141+
@Override
142+
protected Logger getLogger() { return LOGGER; }
143+
141144
@Override
142145
public String toString() {
143146
final StringBuilder sb = new StringBuilder("B2FileInfoResponse{");

src/main/java/synapticloop/b2/response/B2FileResponse.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public B2FileResponse(String json) throws B2ApiException {
6969
}
7070
}
7171

72-
this.warnOnMissedKeys(LOGGER);
72+
this.warnOnMissedKeys();
7373
}
7474

7575
/**
@@ -132,6 +132,9 @@ public B2FileResponse(String json) throws B2ApiException {
132132
*/
133133
public Map<String, String> getFileInfo() { return this.fileInfo; }
134134

135+
@Override
136+
protected Logger getLogger() { return LOGGER; }
137+
135138
@Override
136139
public String toString() {
137140
final StringBuilder sb = new StringBuilder("B2FileResponse{");

src/main/java/synapticloop/b2/response/B2GetUploadUrlResponse.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public B2GetUploadUrlResponse(String json) throws B2ApiException {
4343
this.uploadUrl = this.readString(B2ResponseProperties.KEY_UPLOAD_URL);
4444
this.authorizationToken = this.readString(B2ResponseProperties.KEY_AUTHORIZATION_TOKEN);
4545

46-
this.warnOnMissedKeys(LOGGER);
46+
this.warnOnMissedKeys();
4747
}
4848

4949
/**
@@ -67,6 +67,9 @@ public B2GetUploadUrlResponse(String json) throws B2ApiException {
6767
*/
6868
public String getAuthorizationToken() { return this.authorizationToken; }
6969

70+
@Override
71+
protected Logger getLogger() { return LOGGER; }
72+
7073
@Override
7174
public String toString() {
7275
final StringBuilder sb = new StringBuilder("B2GetUploadUrlResponse{");

src/main/java/synapticloop/b2/response/B2HideFileResponse.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public B2HideFileResponse(String json) throws B2ApiException {
7171
this.size = this.readInt(B2ResponseProperties.KEY_SIZE);
7272
this.uploadTimestamp = this.readLong(B2ResponseProperties.KEY_UPLOAD_TIMESTAMP);
7373

74-
this.warnOnMissedKeys(LOGGER);
74+
this.warnOnMissedKeys();
7575
}
7676

7777
public String getFileId() { return this.fileId; }
@@ -84,6 +84,9 @@ public B2HideFileResponse(String json) throws B2ApiException {
8484

8585
public long getUploadTimestamp() { return this.uploadTimestamp; }
8686

87+
@Override
88+
protected Logger getLogger() { return LOGGER; }
89+
8790
@Override
8891
public String toString() {
8992
final StringBuilder sb = new StringBuilder("B2HideFileResponse{");
@@ -94,4 +97,5 @@ public String toString() {
9497
sb.append('}');
9598
return sb.toString();
9699
}
100+
97101
}

src/main/java/synapticloop/b2/response/B2ListBucketsResponse.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public B2ListBucketsResponse(final String json) throws B2ApiException {
4747
buckets.add(new B2BucketResponse(optJSONArray.optJSONObject(i)));
4848
}
4949

50-
this.warnOnMissedKeys(LOGGER);
50+
this.warnOnMissedKeys();
5151
}
5252

5353
/**
@@ -59,6 +59,9 @@ public List<B2BucketResponse> getBuckets() {
5959
return buckets;
6060
}
6161

62+
@Override
63+
protected Logger getLogger() { return LOGGER; }
64+
6265
@Override
6366
public String toString() {
6467
final StringBuilder sb = new StringBuilder("B2ListBucketsResponse{");

0 commit comments

Comments
 (0)