spring-cloud / spring-cloud/spring-cloud-commons
The logfile in the configuration center does not take effect for actuator
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
This enhancement request comes from this problem
Also,This looks to be very similar to this problem with Spring Cloud Config which was closed as feedback was not provided.
- environment
- SpringBoot:2.6.8
- SpringCloud:2021.0.2
- SpringCloudAlibaba:2021.0.1.0
- nacos:2.1.0
- important step
pom.xmladd dependencyspring-boot-starter-actuator- modify the configuration
- Add the following configuration to
bootstrap.ymlorapplication.ymllogging: file: name: ./log/a.log - Add the following configuration in the
nacosconfiguration centermanagement: endpoints: web: exposure: include: "logfile" # enable log endpoint logging: file: name: ./log/b.log
- Add the following configuration to
- start server
- Open the
logfolder, Contains two filesa.logandb.log, Logs are refreshed inb.log
- issue
- Browser open url
http://[ip]:[port]/actuator/logfile,Only the file content ofa.logis displayed - If
logging.file.nameis not configured inbootstrap.ymlorapplication.yml, A404error code is displayed when visit the url
- Browser open url
- a complete yet minimal sample, include documentation
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked minimal sample and its pom.xml, then reproduce the behavior using bootstrap.yml or application.yml and the Nacos configuration shown in the issue. Check the actuator/logfile endpoint with logging.file.name defined locally and remotely. Done means the endpoint reflects the effective configuration-center logfile, including the case where no local logging.file.name is configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100