BAEL-2927 added logging configuration for tomcat logs (#6967)
This commit is contained in:
parent
e5f3b0f1e6
commit
cb810de745
@ -0,0 +1,14 @@
|
|||||||
|
package com.baeldung.springbootconfiguration.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class GreetingsController {
|
||||||
|
|
||||||
|
@GetMapping("/greetings/{username}")
|
||||||
|
public String getGreetings(@PathVariable("username") String userName) {
|
||||||
|
return "Hello " + userName + ", Good day...!!!";
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
# server configuration
|
# server configuration
|
||||||
server.port=80
|
server.port=4010
|
||||||
server.address=127.0.0.1
|
server.address=127.0.0.1
|
||||||
|
|
||||||
## Error handling configuration
|
## Error handling configuration
|
||||||
@ -21,3 +21,9 @@ server.tomcat.accesslog.directory=logs
|
|||||||
server.tomcat.accesslog.file-date-format=yyyy-MM-dd
|
server.tomcat.accesslog.file-date-format=yyyy-MM-dd
|
||||||
server.tomcat.accesslog.prefix=access_log
|
server.tomcat.accesslog.prefix=access_log
|
||||||
server.tomcat.accesslog.suffix=.log
|
server.tomcat.accesslog.suffix=.log
|
||||||
|
server.tomcat.accesslog.pattern=common
|
||||||
|
server.tomcat.basedir=tomcat
|
||||||
|
|
||||||
|
## Tomcat internal server logs
|
||||||
|
logging.level.org.apache.tomcat=DEBUG
|
||||||
|
logging.level.org.apache.catalina=DEBUG
|
@ -1 +1 @@
|
|||||||
|
spring.profiles.active=tomcat
|
||||||
|
Loading…
x
Reference in New Issue
Block a user