search cancel

Multiple logging.properties file for each VSE component

book

Article ID: 38124

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

    When I start multiple VSE components in my environment, each VSE component is writing matches details to a single vse_matches.log file. Is there any way to create a separate log for each VSE matches log? 

 

Environment

all supported DevTest releases.

Cause

N/A

Resolution

To create a separate log file for each VSE component, you need to create logging.properties file for each component.

To do this, we need to add below property in each VirtualServiceenvironment.vmoptions file and restart all Devtest components.

       -Dlog4j.configuration=<path_to_logging.properties_file>

Ex:

       -Dlog4j.configuration=C:/DevTestx.x/my.logging2.properties

 

In my.logging.properties file, give match file details as for DevTest 10.6.0 and earlier:

log4j.additivity.VSE=false

log4j.appender.VSEAPP=com.itko.util.log4j.TimedRollingFileAppender

log4j.appender.VSEAPP.File=${lisa.tmpdir}/vse2_my_matches.log

log4j.appender.VSEAPP.MaxFileSize=1KB

log4j.appender.VSEAPP.MaxBackupIndex=20

log4j.appender.VSEAPP.layout=org.apache.log4j.EnhancedPatternLayout

log4j.appender.VSEAPP.layout.ConversionPattern=%d{ISO8601}{UTC}Z (%d{HH:mm})[%t] %-5p - %m%n

 

In my.logging.properties file, give match file details as for DevTest 10.7.0 and later

# set the log level to OFF or WARN instead of INFO
logger.VSE.name = VSE
logger.VSE.level = INFO
# If you want to add VSE logging to other log destinations, comment out the next line
logger.VSE.additivity = false
logger.VSE.appenderRefs = VSEAPP
logger.VSE.appenderRef.VSEAPP.ref = VSEAPP

appender.VSEAPP.type = RollingFile
appender.VSEAPP.name = VSEAPP
appender.VSEAPP.fileName = ${sys:lisa.tmpdir}/vse_matches.log
appender.VSEAPP.filePattern = ${sys:lisa.tmpdir}/vse_matches.log.%i
appender.VSEAPP.layout.type = PatternLayout
appender.VSEAPP.layout.pattern = %d{ISO8601}{UTC}Z (%d{HH:mm})[%t] %-5p - %m%n
appender.VSEAPP.policies.type = Policies
appender.VSEAPP.policies.size.type = SizeBasedTriggeringPolicy
appender.VSEAPP.policies.size.size = 10MB
appender.VSEAPP.strategy.type = DefaultRolloverStrategy
appender.VSEAPP.strategy.max = 20
appender.VSEAPP.strategy.fileIndex = min