강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

alstn87750님의 프로필 이미지
alstn87750

작성한 질문수

spring boot nginx 로그 출력

작성

·

464

0

IDE에서 콘솔에 log.info() 로 작성한 로그들이나, select문같은 쿼리들 잘 출력이 되는데 aws ubuntu nginx 로 배포한 서버에서 이런 콘솔 로그들을 찍어보고 싶어서 application.yml 파일에 설정도 하고 해봐도 /var/log/nginx/ 밑에 accesslog에는 제가 보고싶은 로그들이 안 찍히더라고요. /var/www/admin/log/ 로그에도 마찬가지고요 sysout이나 log들을 실서버에서 출력해서 보는 방법은 없을까요?

spring:
  profiles: real
  datasource:
    hikari:
      driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
      jdbc-url: jdbc:log4jdbc:sqlserver://localhost:1433;databasename=test
      username: sa
      password: *****
  servlet:
    multipart:
      max-file-size: 200MB
      max-request-size: 200MB
  thymeleaf:
    cache: false

logging:
  dir: /var/www/admin/log/
  level:
    org.springframework: ERROR
    org.springframework.web: ERROR
    org.hibernate.sql: OFF

mybatis:
  mapper-locations: classpath:mybatis/mapper/**/*.xml
 
pagehelper:
  helper-dialect: sqlserver
  reasonable: true
  supportMethodsArguments: true

server:
  servlet:
    session:
      timeout: 4320000m
      cookie:
        name: admin_JSESSIONID
        max-age: 432000m
  port: 8080
  tomcat:
    basedir: ./
    accesslog:
      enabled: true
      directory: logs
      suffix: .log
      prefix: access_log
      file-date-format: .yyyy-MM-dd
      pattern: common

답변

답변을 기다리고 있는 질문이에요
첫번째 답변을 남겨보세요!
alstn87750님의 프로필 이미지
alstn87750

작성한 질문수

질문하기