Spring Boot. Missed /logfile endpoint

spring boot 2 actuator endpoints
spring boot actuator not working 404
spring boot actuator/httptrace
spring boot actuator is not enabled
spring actuator custom endpoint
spring boot 2.2 1 actuator
spring boot 2 actuator security
spring boot log file location

I have a problem with logfile endpoint in my spring boot application - it's missed. This is my application config:

  port: 8081

    name: Foo Service
    component: Foo Service

secret-message: "{cipher}a702d2b5b0c6bc2db67e7d487c6142e7c23254108503d1856ff516d0a64bbd3663a2514a86647dcf8467d042abcb8a6e"

  file: "target/foo.log"

  context-path: "/actuator"

    name: "foo-service"
      url: http://spring-boot-admin-url:9000
        health-url: http://app-url:8081/actuator/health
        management-url: http://app-url:8081/actuator
        service-url: http://app-url:8081
          user.name: "${security.user.name}"
          user.password:  "${security.user.password}"
      username: "${security.user.name}"
      password: "${security.user.password}"

    name: name
    password: password

Spring boot starter actuator version is 1.5.2. Also /info and /health endpoints works well for example.

Do you get an 404 (not found) or 401 (unauthorized)? If the latter is the case, add

      sensitive: false

Otherwise you may enable the autoconfiguration logging by setting the level to DEBUG and search for "logfile". This may give you some hints if and why the endpoint might not has been enabled.


java - Spring Boot. Missed /logfile endpoint, Do you get an 404 (not found) or 401 (unauthorized)? If the latter is the case, add endpoints: logfile: sensitive: false. Otherwise you may enable  It's evaluated first on application startup (determining the logfile name on the file system). Every time the endpoint is accessed and tries to resolve the logfile name in LogFileWebEndpoint.getLogFileResource() a new random value is generated, thus the logfile cannot be found.

If you get 401 unauthorized, please read this document first.

By default all sensitive HTTP endpoints are secured such that only users that have an ACTUATOR role may access them. Security is enforced using the standard HttpServletRequest.isUserInRole method.

[Tip] Use the management.security.roles property if you want something different to ACTUATOR.

If you are deploying applications behind a firewall, you may prefer that all your actuator endpoints can be accessed without requiring authentication. You can do this by changing the management.security.enabled property:



Spring Boot Actuator, I am trying to set up Spring Boot Actuator (v2) with Spring MVC (v5) without @​SpringBootApplication. I managed to get the endpoints up and  Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

If what you get is a 404, make sure to add logging.file or logging.path property in application.properties, as stated in Endpoints (logfile) documentation:

Returns the contents of the logfile (if logging.file or logging.path properties have been set). Supports the use of the HTTP Range header to retrieve part of the log file’s content.

I don't understand why the accepted answer worked, but for most cases, this is the reason why logfile endpoint gives a 404 response.

/actuator/logfile endpoint returning 404 when logging.file property , I'm running a Spring Boot 2.1.6.RELEASE application using spring-boot-starter-​actuator to expose the application's logfile over HTTP. Spring Boot Logfile Endpoint Example Custom Endpoint Implementation Apart from the above default endpoints exposed by spring boot, developers can write their own endpoints by implementing the interface Endpoint .

/actuator/logfile returns a 404 · Issue #18191 · spring-projects/spring , I am using spring-boot-starter-actuator to expose my application error response is returned when querying the endpoint /actuator/logfile. Manipulating the environment in ApplicationEnvironmentPreparedEvent is too late. However, Spring Boot Actuator has this functionality built-in and can be used through its httpTrace endpoint which traces all HTTP requests. In this tutorial, we'll show how to use it and how to customize it to fit better our requirements.

Spring Boot Actuator Web API Documentation, Execution type of the change set ( EXECUTED , FAILED , SKIPPED , RERAN The logfile endpoint provides access to the contents of the  In this article, we talked about Spring Boot Actuator. We started defining what Actuator means and what it does for us. Next, we focused on Actuator for the current Spring Boot version, 1.x. discussing how to use it, tweak it an extend it. Then, we discussed Actuator in Spring Boot 2.

Appendix A. Common application properties, Execution type of the change set ( EXECUTED , FAILED , SKIPPED , RERAN The logfile endpoint provides access to the contents of the application's log file. In this post, we showed how we can use spring-boot-actuator for getting different metrics data for your spring boot based service. This entry was posted in Java , Programming , REST , Spring-boot , Swagger and tagged actuator , Java , Spring-boot on September 14, 2018 by yogesh.mali@gmail.com .

  • Thank you man! With logging.level.org.springframework.boot.autoconfigure.logging=DEBUG it's working now :)
  • Just by enabling the debug logging?!? That should not have any influence. Sure that made the point?
  • Yep, I did nothing but that. Setting autoconfiguration logging by setting the log level to DEBUG did it for sure.
  • It was 404 by the way.