Add logging preferences

This commit is contained in:
kimyonghwa
2019-05-01 00:56:12 +09:00
parent 3b75ea18c0
commit cdc10997fc
3 changed files with 17 additions and 3 deletions

View File

@@ -2,10 +2,12 @@ package com.rest.api.controller;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Slf4j
@Controller
public class HelloController {
@@ -20,6 +22,8 @@ public class HelloController {
@GetMapping(value = "/helloworld/string")
@ResponseBody
public String helloworldString() {
log.debug("Helloworld");
log.info("Helloworld");
return HELLO;
}

View File

@@ -1,3 +1,11 @@
logging:
level:
root: warn
com.rest.api: info
path: /var/log
file:
max-history: 7
spring:
profiles: alpha
datasource:
@@ -13,4 +21,4 @@ spring:
showSql: true
generate-ddl: false
url:
base: http://alpha.daddyprogrammer.org
base: http://alpha.daddyprogrammer.org

View File

@@ -1,5 +1,7 @@
server:
port: 8080
logging:
level:
root: warn
com.rest.api: debug
spring:
profiles: local