本文整理汇总了Java中io.github.jhipster.registry.web.rest.dto.LoggerDTO类的典型用法代码示例。如果您正苦于以下问题:Java LoggerDTO类的具体用法?Java LoggerDTO怎么用?Java LoggerDTO使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LoggerDTO类属于io.github.jhipster.registry.web.rest.dto包,在下文中一共展示了LoggerDTO类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getList
import io.github.jhipster.registry.web.rest.dto.LoggerDTO; //导入依赖的package包/类
@GetMapping("/logs")
@Timed
public List<LoggerDTO> getList() {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
return context.getLoggerList()
.stream()
.map(LoggerDTO::new)
.collect(Collectors.toList());
}
示例2: getList
import io.github.jhipster.registry.web.rest.dto.LoggerDTO; //导入依赖的package包/类
@RequestMapping(value = "/logs",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public List<LoggerDTO> getList() {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
return context.getLoggerList()
.stream()
.map(LoggerDTO::new)
.collect(Collectors.toList());
}
示例3: changeLevel
import io.github.jhipster.registry.web.rest.dto.LoggerDTO; //导入依赖的package包/类
@RequestMapping(value = "/logs",
method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
@Timed
public void changeLevel(@RequestBody LoggerDTO jsonLogger) {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel()));
}
示例4: changeLevel
import io.github.jhipster.registry.web.rest.dto.LoggerDTO; //导入依赖的package包/类
@PutMapping("/logs")
@Timed
public void changeLevel(@RequestBody LoggerDTO jsonLogger) {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel()));
}