Multiple logging.properties file for each VSE component
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/vse2.logging2.properties

 

In vse2.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}/vse2_matches.log
appender.VSEAPP.filePattern = ${sys:lisa.tmpdir}/vse2_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