Skip to content

Commit

Permalink
Merge pull request #350 from BCSDLab/develop
Browse files Browse the repository at this point in the history
v2.0.1
  • Loading branch information
Choi-JJunho authored Mar 7, 2024
2 parents 69c150f + 14afd57 commit 707fbf7
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 2 deletions.
33 changes: 32 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,41 @@
<version>1.9.4</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.3.11</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-access</artifactId>
<version>1.3.11</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.3.11</version>
</dependency>

<!-- mongodb -->
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="org.springframework" level="INFO"/>
<logger name="springfox.documentation" level="ERROR"/>

</configuration>
1 change: 0 additions & 1 deletion src/main/resources/mapper/admin/AdminShopMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@
FROM `koin`.`shops`
WHERE
`id` = #{id}
AND `is_deleted` = 0
</select>

<select id="getMenuCategoryByShopIdAndName" resultType="koreatech.in.domain.Shop.ShopMenuCategory">
Expand Down
18 changes: 18 additions & 0 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,25 @@
classpath*:common/*.xml
</param-value>
</context-param>
<filter>
<filter-name>TeeFilter</filter-name>
<filter-class>ch.qos.logback.access.servlet.TeeFilter</filter-class>
<init-param>
<param-name>excludes</param-name>
<param-value>swagger-ui.html</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>TeeFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>TeeFilter</filter-name>
<url-pattern>/swagger-ui.html</url-pattern> <!-- Add the URL pattern you want to exclude -->
<dispatcher>REQUEST</dispatcher> <!-- Exclude only request type -->
</filter-mapping>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
Expand Down
29 changes: 29 additions & 0 deletions tomcat/conf/logback-access.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<configuration>
<property name="LOG_PATH_NAME" value="${user.home}/http-access.log"/>
<property name="HTTP_PATTERN" value="%n-------- INFO --------%n- time: %t{yyyy-MM-dd HH:mm:ss}%n- summary: %a\t%r\t%s%n%n-------- HTTP REQUEST --------%n%header{Referer}\t%header{User-Agent}\t%D\t%I%n%fullRequest%n-------- HTTP RESPONSE --------%n%fullResponse%n--------%n"/>


<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH_NAME}/access.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH_NAME}/access.%d{yyyy-MM-dd}.log</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${HTTP_PATTERN}</pattern>
</encoder>
</appender>

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${HTTP_PATTERN}</pattern>
</encoder>
</appender>

<logger name="org.springframework" level="ERROR"/>
<logger name="springfox.documentation" level="ERROR"/>
<logger name="springfox.documentation.schema.property.bean.BeanModelProperty" level="INFO"/>

<appender-ref ref="FILE"/>
<appender-ref ref="CONSOLE"/>
</configuration>

0 comments on commit 707fbf7

Please sign in to comment.