|
|
@ -1,5 +1,6 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright 2012-2017 the original author or authors.
|
|
|
|
* Copyright 2012-2017 the original author or authors.
|
|
|
|
|
|
|
|
* Copyright 2016-2017 the original author or authors.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
@ -62,6 +63,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @author Ben Hale
|
|
|
|
* @author Ben Hale
|
|
|
|
* @author Phillip Webb
|
|
|
|
* @author Phillip Webb
|
|
|
|
|
|
|
|
* @author Kazuki Shimizu
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
|
@RunWith(SpringRunner.class)
|
|
|
|
@SpringBootTest
|
|
|
|
@SpringBootTest
|
|
|
@ -131,7 +133,7 @@ public class LoggersMvcEndpointTests {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void setLoggerShouldSetLogLevel() throws Exception {
|
|
|
|
public void setLoggerShouldSetLogLevel() throws Exception {
|
|
|
|
this.mvc.perform(post("/loggers/ROOT").contentType(MediaType.APPLICATION_JSON)
|
|
|
|
this.mvc.perform(post("/loggers/ROOT").contentType(MediaType.APPLICATION_JSON)
|
|
|
|
.content("{\"configuredLevel\":\"DEBUG\"}")).andExpect(status().isOk());
|
|
|
|
.content("{\"configuredLevel\":\"debug\"}")).andExpect(status().isOk());
|
|
|
|
verify(this.loggingSystem).setLogLevel("ROOT", LogLevel.DEBUG);
|
|
|
|
verify(this.loggingSystem).setLogLevel("ROOT", LogLevel.DEBUG);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|