톰켓에 로그 파일이 복잡하게 생성되어 관리가 복잡합니다.
관련해서 운영에 필요한 정보만(catalina.out 1개 파일만 관리) 생성하도록 처리하는 방법입니다.
** 기관에 납품하기전 관련내용 확인 후 변경여부 결정하시기 바랍니다. **
** handlers 관련 변경하고 나머지 모두 주석처리
# vi $CATALINA_HOM/conf/logging.properties
handlers = java.util.logging.ConsoleHandler
.handlers = java.util.logging.ConsoleHandler
#handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host- manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
#
#.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
#
#############################################################
## Handler specific properties.
## Describes specific configuration info for Handlers.
#############################################################
#
#1catalina.org.apache.juli.FileHandler.level = FINE
#1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
#1catalina.org.apache.juli.FileHandler.prefix = catalina.
#
#2localhost.org.apache.juli.FileHandler.level = FINE
#2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
#2localhost.org.apache.juli.FileHandler.prefix = localhost.
#
#3manager.org.apache.juli.FileHandler.level = FINE
#3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
#3manager.org.apache.juli.FileHandler.prefix = manager.
#
#4host-manager.org.apache.juli.FileHandler.level = FINE
#4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
#4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
#
#java.util.logging.ConsoleHandler.level = FINE
#java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
#
#
#############################################################
## Facility specific properties.
## Provides extra control for each logger.
#############################################################
#
#org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
#org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
#
#org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
#org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
#
#org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
#org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
#
## For example, set the org.apache.catalina.util.LifecycleBase logger to log
## each component that extends LifecycleBase changing state:
##org.apache.catalina.util.LifecycleBase.level = FINE
#
## To see debug messages in TldLocationsCache, uncomment the following line:
##org.apache.jasper.compiler.TldLocationsCache.level = FINE
** Valve 부분 주석처리
# vi $CATALINA_HOME/conf/Catalina/localhost/ROOT.xml
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="/usr/local/jakarta/nextbsc/WebRoot" path="/" reloadable="true" antiResourceLocking="false" antiJARLocking="false">
<Loader delegate="false"/>
<!-- <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".txt" pattern="common"/>-->
<Resource name="jdbc1/dbms" auth="Container" description="DB Connection"
type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
driverClassName="com.tmax.tibero.jdbc.TbDriver"
url="jdbc:tibero:thin:@DB:8629:NEXTBSC"
username="xxxxx"
password="xxxxx"
maxActive="100"
initialSize="30"
maxIdle="30"
minIdle="30"
maxWait="-1"
validationQuery="SELECT 1 FROM DUAL"
testOnBorrow="true"
testOnReturn="false"
testWhileIdle="false"
timeBetweenEvictionRunsMillis="60000"
numTestsPerEvictionRun="5"
minEvictableIdleTimeMillis="3600000"
/>
:
:
:
</Context>
** catalina.out 파일만 존재여부 확인
# ls $CATALINA_HOME/logs