@RequestMapping(
     value = "/log/{name}",
     method = RequestMethod.GET,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @ResponseBody
 public List<LogEvent> getLogEvent(@PathVariable String name) {
   return delegate.getLogEvents(name);
 }
 @RequestMapping(
     value = "/logger/{name}/{level}",
     method = RequestMethod.PUT,
     consumes = MediaType.APPLICATION_JSON_VALUE)
 @ResponseBody
 @ResponseStatus(HttpStatus.NO_CONTENT)
 public void changeLevel(@PathVariable String name, @PathVariable String level) {
   delegate.changeLevel(LoggerBuilder.builder().withName(name).withLevel(level).build());
 }
 @RequestMapping(
     value = "/log/{name}/{after}",
     method = RequestMethod.GET,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @ResponseBody
 public List<LogEvent> getLogEvent(
     @PathVariable String name, @PathVariable @DateTimeFormat(iso = ISO.DATE_TIME) Date after) {
   return delegate.getLogEvents(name, after);
 }
  @RequestMapping(
      value = "/logger/{name}",
      method = RequestMethod.GET,
      produces = MediaType.APPLICATION_JSON_VALUE)
  @ResponseBody
  public LoggerResource getLogger(@PathVariable String name) {
    Logger logger = delegate.getLogger(name);
    LoggerResource loggerResource = new LoggerResource(logger);
    loggerResource.add(
        linkTo(LoggingHateoasMvcEndpoint.class)
            .slash(this.getPath() + "/logger/" + logger.getName())
            .withSelfRel());

    return loggerResource;
  }
  @RequestMapping(
      value = "/logger",
      method = RequestMethod.GET,
      produces = MediaType.APPLICATION_JSON_VALUE)
  @ResponseBody
  public Resources<LoggerResource> getLoggers() {
    List<Logger> loggers = delegate.getLoggers();
    List<LoggerResource> loggerResources = new ArrayList<>();
    for (Logger logger : loggers) {
      LoggerResource loggerResource = new LoggerResource(logger);
      loggerResource.add(
          linkTo(LoggingHateoasMvcEndpoint.class)
              .slash(this.getPath() + "/logger/" + logger.getName())
              .withSelfRel());
      loggerResources.add(loggerResource);
    }

    return new Resources<LoggerResource>(
        loggerResources,
        linkTo(LoggingHateoasMvcEndpoint.class).slash(this.getPath() + "/logger").withSelfRel());
  }
  @RequestMapping(
      value = "/log",
      method = RequestMethod.GET,
      produces = MediaType.APPLICATION_JSON_VALUE)
  @ResponseBody
  public Resources<AppenderResource> getAppenders() {
    List<Appender> appenders = delegate.getAppenders();
    List<AppenderResource> appenderResources = new ArrayList<>();
    for (Appender appender : appenders) {
      AppenderResource appenderResource = new AppenderResource(appender);
      appenderResource.add(
          linkTo(LoggingHateoasMvcEndpoint.class)
              .slash(this.getPath() + "/log/" + appender.getName())
              .withSelfRel());
      appenderResources.add(appenderResource);
    }

    return new Resources<AppenderResource>(
        appenderResources,
        linkTo(LoggingHateoasMvcEndpoint.class).slash(this.getPath() + "/log").withSelfRel());
  }
 @Override
 public Class<? extends Endpoint> getEndpointType() {
   return delegate.getClass();
 }
 @Override
 public boolean isSensitive() {
   return delegate.isSensitive();
 }