spring application,properties logging entire application code example
Example 1: spring log properties
logging:
#pattern:
#file: %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%
file: app/application.log
level:
org:
springframework: INFO
hibernate:
SQL: INFO
type:
descriptor:
sql:
BasicBinder: INFO
web: DEBUG
com:
codeswifter: DEBUG
##logging.pattern.file= %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%
pattern:
console: :%d %5p [%-20.20t] %-35.35logger{15}:%-4.4L |%-15.15X{Email}|%-32.32X{UserId}| - %m%n
Example 2: professional logging in spring boot
%black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1.}): %msg%n%throwable ${LOGS}/spring-boot-logger.log %d %p %C{1.} [%t] %m%n ${LOGS}/archived/spring-boot-logger-%d{yyyy-MM-dd}.%i.log 10MB