Skip to content

Commit de0e65c

Browse files
committed
Print with timestamp
1 parent b2d8695 commit de0e65c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

request/src/main/java/org/botblock/javabotblockapi/requests/handler/RequestHandler.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ public void performPOST(@Nonnull JSONObject json, int sites) throws IOException{
136136
if(responseBody == null){
137137
LOG.error("Received empty Response from BotBlock API!");
138138
LOG.error(
139-
"Response{protocol={}, code={}, message={}, headers={}}",
139+
"Response{timestamp={}, protocol={}, code={}, message={}, headers={}}",
140+
System.currentTimeMillis(),
140141
response.protocol(),
141142
response.code(),
142143
response.message(),
@@ -149,7 +150,8 @@ public void performPOST(@Nonnull JSONObject json, int sites) throws IOException{
149150
if(bodyString.isEmpty()){
150151
LOG.error("Received empty Response from BotBlock API!");
151152
LOG.error(
152-
"Response{protocol={}, code={}, message={}, headers={}}",
153+
"Response{timestamp={}, protocol={}, code={}, message={}, headers={}}",
154+
System.currentTimeMillis(),
153155
response.protocol(),
154156
response.code(),
155157
response.message(),
@@ -206,7 +208,8 @@ private JSONObject performGET(@Nonnull String url, String header) throws IOExcep
206208
if(body == null){
207209
LOG.error("Received empty Response from BotBlock API!");
208210
LOG.error(
209-
"Response{protocol={}, code={}, message={}, headers={}}",
211+
"Response{timestamp={}, protocol={}, code={}, message={}, headers={}}",
212+
System.currentTimeMillis(),
210213
response.protocol(),
211214
response.code(),
212215
response.message(),
@@ -219,7 +222,8 @@ private JSONObject performGET(@Nonnull String url, String header) throws IOExcep
219222
if(bodyString.isEmpty()){
220223
LOG.error("Received empty Response from BotBlock API!");
221224
LOG.error(
222-
"Response{protocol={}, code={}, message={}, headers={}}",
225+
"Response{timestamp={}, protocol={}, code={}, message={}, headers={}}",
226+
System.currentTimeMillis(),
223227
response.protocol(),
224228
response.code(),
225229
response.message(),

0 commit comments

Comments
 (0)