Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
57c7e85e
Commit
57c7e85e
authored
Apr 12, 2018
by
Pierre Padovani
Committed by
apoorvnaik
Apr 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2564: Change logging levels within the client to reduce verbosity
Signed-off-by:
apoorvnaik
<
apoorvnaik@apache.org
>
parent
45bf48e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
AtlasBaseClient.java
...ommon/src/main/java/org/apache/atlas/AtlasBaseClient.java
+17
-10
No files found.
client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java
View file @
57c7e85e
...
...
@@ -327,12 +327,14 @@ public abstract class AtlasBaseClient {
ClientResponse
clientResponse
=
null
;
int
i
=
0
;
do
{
LOG
.
info
(
"------------------------------------------------------"
);
LOG
.
info
(
"Call : {} {}"
,
api
.
getMethod
(),
api
.
getNormalizedPath
());
LOG
.
info
(
"Content-type : {} "
,
api
.
getConsumes
());
LOG
.
info
(
"Accept : {} "
,
api
.
getProduces
());
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"------------------------------------------------------"
);
LOG
.
debug
(
"Call : {} {}"
,
api
.
getMethod
(),
api
.
getNormalizedPath
());
LOG
.
debug
(
"Content-type : {} "
,
api
.
getConsumes
());
LOG
.
debug
(
"Accept : {} "
,
api
.
getProduces
());
if
(
requestObject
!=
null
)
{
LOG
.
info
(
"Request : {}"
,
requestObject
);
LOG
.
debug
(
"Request : {}"
,
requestObject
);
}
}
WebResource
.
Builder
requestBuilder
=
resource
.
getRequestBuilder
();
...
...
@@ -349,7 +351,12 @@ public abstract class AtlasBaseClient {
clientResponse
=
requestBuilder
.
method
(
api
.
getMethod
(),
ClientResponse
.
class
,
requestObject
);
LOG
.
info
(
"HTTP Status : {}"
,
clientResponse
.
getStatus
());
LOG
.
debug
(
"HTTP Status : {}"
,
clientResponse
.
getStatus
());
if
(!
LOG
.
isDebugEnabled
())
{
LOG
.
info
(
"method={} path={} contentType={} accept={} status={}"
,
api
.
getMethod
(),
api
.
getNormalizedPath
(),
api
.
getConsumes
(),
api
.
getProduces
(),
clientResponse
.
getStatus
());
}
if
(
clientResponse
.
getStatus
()
==
api
.
getExpectedStatus
().
getStatusCode
())
{
if
(
responseType
==
null
)
{
...
...
@@ -360,16 +367,16 @@ public abstract class AtlasBaseClient {
String
stringEntity
=
clientResponse
.
getEntity
(
String
.
class
);
try
{
JsonNode
jsonObject
=
AtlasJson
.
parseToV1JsonNode
(
stringEntity
);
LOG
.
info
(
"Response : {}"
,
jsonObject
);
LOG
.
info
(
"------------------------------------------------------"
);
LOG
.
debug
(
"Response : {}"
,
jsonObject
);
LOG
.
debug
(
"------------------------------------------------------"
);
return
(
T
)
jsonObject
;
}
catch
(
IOException
e
)
{
throw
new
AtlasServiceException
(
api
,
e
);
}
}
else
{
T
entity
=
clientResponse
.
getEntity
(
responseType
);
LOG
.
info
(
"Response : {}"
,
entity
);
LOG
.
info
(
"------------------------------------------------------"
);
LOG
.
debug
(
"Response : {}"
,
entity
);
LOG
.
debug
(
"------------------------------------------------------"
);
return
entity
;
}
}
catch
(
ClientHandlerException
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment