Service Virtualization

Expand all | Collapse all

How do I create vse_matches backup files?

  • 1.  How do I create vse_matches backup files?

    Posted Feb 06, 2018 10:45 AM

    My VS responses are too huge, which is causing my vse_matches.log file to grow quickly and I'm unable to load it.

     

    Is there a way I can backup the vse_matches.log after it reaches certain defined size?

     

    like vse_matches.log.1

           vse_matches.log.2 and so on... ?

     

    J_NeSmith

    gadpr08

    abrsh01

    Deleted User

    monika_mehta



  • 2.  Re: How do I create vse_matches backup files?

    Posted Feb 06, 2018 12:22 PM

    Hi,

        Please go through this Logging Properties File - DevTest Solutions - 10.1 - CA Technologies Documentation.This will help you.

                                                    Thanks,

    Vish



  • 3.  Re: How do I create vse_matches backup files?

    Posted Feb 06, 2018 01:17 PM

    LearnNow is correct.  Look in logging.properties for:

    log4j.additivity.VSE=false
    log4j.appender.VSEAPP=com.itko.util.log4j.TimedRollingFileAppender
    log4j.appender.VSEAPP.File=${lisa.tmpdir}/vse_matches.log
    log4j.appender.VSEAPP.MaxFileSize=10MB
    log4j.appender.VSEAPP.MaxBackupIndex=20

    The filesize parameter controls the VSE log file size. 10MB is the default. Sometime tools like notepad have issues opening large files. You can change the value.

    Similarly, the ...Index=20 is the number of log file occurrences that Log4J will retain. In the example, once 20 log files are created, the oldest log is dropped when the log file wraps. (e.g., vse.log.20 is dropped, vse.log.19 becomes vse.log.20 and so on)

    Some customers have their own backup mechanisms for DevTest log files; however, OOTB DevTest does not have an automatic backup process outside these configuration settings.



  • 4.  Re: How do I create vse_matches backup files?

    Posted Feb 06, 2018 02:12 PM

    I have the following section in my logging.properties file:

     

    # Keep a separate log for VSE transaction match/no-match events, this makes debugging much easier.
    # Change INFO below to WARN for production systems, the logging is expensive and will slow down
    # systems with high transaction rates. Do not simply comment out the following line; explicitly
    # set the log level to OFF or WARN instead of INFO
    log4j.logger.VSE=DEBUG, VSEAPP
    # If you want to add VSE logging to other log destinations, comment out the next line
    log4j.additivity.VSE=false
    log4j.appender.VSEAPP=com.itko.util.log4j.TimedRollingFileAppender
    log4j.appender.VSEAPP.File=${lisa.tmpdir}/vse_matches.log
    log4j.appender.VSEAPP.MaxFileSize=10MB
    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

     

     

    But this is not backing up my vse_matches.log file.

    I only see the backup files for vse.log and registry.log under the LISATMP folder.

     

    What changes should I do to get the vse_matches.log to be backed up...?



  • 5.  Re: How do I create vse_matches backup files?
    Best Answer

    Posted Feb 06, 2018 06:45 PM

    Ah, OK. I think what you are saying is that the vse_matches.log is not rolling over. If this is the case, try the following:

    1. If running as a service, edit the LISA_HOME/bin VirtualServiceEnvironmentService.vmoptions file. Apply the same directive in VirtualServiceEnvironment.vmoptions.
      1. Stop the VSE Service
      2. Add a directive -DVSELOGFIX=vseFix
      3. Save the changes.

    2. Edit LISA_HOME\logging.properties

    1. Locate the lines below for the appender:

    log4j.logger.VSE=INFO, VSEAPP

    # If you want to add VSE logging to other log destinations, comment out the next line

    log4j.additivity.VSE=false

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

    # Fix for VSE_MATCHES log not rolling

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

    log4j.appender.VSEAPP.MaxFileSize=10MB

    B. Replace the highlighted line, above, with:

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

    c. Save the file

    3. Restart the VSE service.



  • 6.  Re: How do I create vse_matches backup files?

    Posted Feb 07, 2018 11:00 AM

    Hey Joe,

     

    I tried this. Now the file is being named as vseFixvse_matches.log

    I have set the limit to 2MB, just for testing purpose. When the file crosses this limit, we see a new file named vseFixvse_matches.log.1.  Now, the old file is being cleaned up and the new file seems to have all the 2MB+ logs.



  • 7.  Re: How do I create vse_matches backup files?

    Posted Feb 07, 2018 02:05 PM

    It's actually working, but only the first file is getting wiped out. That's OK for me now.

    Thanks a lot J_NeSmith

     

    Please see below:

     



  • 8.  Re: How do I create vse_matches backup files?

    Posted Feb 07, 2018 05:52 PM

    The rollover occurs in reverse order. So at 12:22 pm, vseFixvse_matches.log rolled to vseFixvse_matches.log.1.

    But, before that roll happened...

    vseFixvse_matches.log.10 rolls off.

    vseFixvse_matches.log.9 rolls to vseFixvse_matches.log.10

    vseFixvse_matches.log.8 rolls to vseFixvse_matches.log.9

    and so on until vseFixvse_matches.log rolled to vseFixvse_matches.log.1 and an empty vseFixvse_matches.log was created.



  • 9.  Re: How do I create vse_matches backup files?

    Posted Feb 08, 2018 10:29 AM

    Yes. Actually it looked empty, but when i dbl-clicked and opened it, it was having data. It wasn't refreshed i think.

     

    Thank you.



  • 10.  Re: How do I create vse_matches backup files?

    Posted Sep 11, 2018 12:21 PM

    Hi,

     

    Is their any problem if we delete old files?



  • 11.  Re: How do I create vse_matches backup files?

    Broadcom Employee
    Posted Sep 12, 2018 09:16 AM

    There should not be.



  • 12.  Re: How do I create vse_matches backup files?

    Posted Feb 07, 2018 10:35 AM

    Hi Joel,

                I have a question for you, where is this directive  -DVSELOGFIX value "vseFix" defined in DevTest.What is the significance of this value?

                                                                    Thanks,

    Vish



  • 13.  Re: How do I create vse_matches backup files?

    Posted Feb 07, 2018 12:21 PM

    The directive itself has no significance. It simply creates a property called VSELOGFIX and assigns a value 'vseFix'.

    When we reference $VSELOGFIX in the appender, the JVM replaces the key with the value.

    I could just have easily called the directive -DLOGFIX.



  • 14.  Re: How do I create vse_matches backup files?

    Posted Feb 07, 2018 12:38 PM

    Thanks J_NeSmith