Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
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
DEMO
spring-boot
Commits
60a50a7a
Commit
60a50a7a
authored
May 19, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8919 from eddumelendez:gh-8814
* pr/8919: Modify return on post /loggers to HTTP 204
parents
2ccefbc2
ce0b1b24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
EndpointDocumentation.java
...mework/boot/actuate/hypermedia/EndpointDocumentation.java
+1
-1
LoggersMvcEndpoint.java
...amework/boot/actuate/endpoint/mvc/LoggersMvcEndpoint.java
+1
-1
LoggersMvcEndpointTests.java
...rk/boot/actuate/endpoint/mvc/LoggersMvcEndpointTests.java
+2
-2
No files found.
spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java
View file @
60a50a7a
...
...
@@ -126,7 +126,7 @@ public class EndpointDocumentation {
.
perform
(
post
(
"/application/loggers/org.springframework.boot"
)
.
contentType
(
ActuatorMediaTypes
.
APPLICATION_ACTUATOR_V2_JSON
)
.
content
(
"{\"configuredLevel\": \"DEBUG\"}"
))
.
andExpect
(
status
().
is
Ok
()).
andDo
(
document
(
"set-logger"
));
.
andExpect
(
status
().
is
NoContent
()).
andDo
(
document
(
"set-logger"
));
}
@Test
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LoggersMvcEndpoint.java
View file @
60a50a7a
...
...
@@ -71,7 +71,7 @@ public class LoggersMvcEndpoint extends EndpointMvcAdapter {
try
{
LogLevel
logLevel
=
getLogLevel
(
configuration
);
this
.
delegate
.
setLogLevel
(
name
,
logLevel
);
return
ResponseEntity
.
ok
().
build
();
return
ResponseEntity
.
noContent
().
build
();
}
catch
(
IllegalArgumentException
ex
)
{
return
ResponseEntity
.
badRequest
().
build
();
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LoggersMvcEndpointTests.java
View file @
60a50a7a
...
...
@@ -150,7 +150,7 @@ public class LoggersMvcEndpointTests {
@Test
public
void
setLoggerUsingApplicationJsonShouldSetLogLevel
()
throws
Exception
{
this
.
mvc
.
perform
(
post
(
PATH
+
"/ROOT"
).
contentType
(
MediaType
.
APPLICATION_JSON
)
.
content
(
"{\"configuredLevel\":\"debug\"}"
)).
andExpect
(
status
().
is
Ok
());
.
content
(
"{\"configuredLevel\":\"debug\"}"
)).
andExpect
(
status
().
is
NoContent
());
verify
(
this
.
loggingSystem
).
setLogLevel
(
"ROOT"
,
LogLevel
.
DEBUG
);
}
...
...
@@ -158,7 +158,7 @@ public class LoggersMvcEndpointTests {
public
void
setLoggerUsingActuatorV2JsonShouldSetLogLevel
()
throws
Exception
{
this
.
mvc
.
perform
(
post
(
PATH
+
"/ROOT"
)
.
contentType
(
ActuatorMediaTypes
.
APPLICATION_ACTUATOR_V2_JSON
)
.
content
(
"{\"configuredLevel\":\"debug\"}"
)).
andExpect
(
status
().
is
Ok
());
.
content
(
"{\"configuredLevel\":\"debug\"}"
)).
andExpect
(
status
().
is
NoContent
());
verify
(
this
.
loggingSystem
).
setLogLevel
(
"ROOT"
,
LogLevel
.
DEBUG
);
}
...
...
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