Message Logging

 

You can log request and response data generated during learning, simulation, and standby modes.

Message logs enable you to:

  • Review the messages more closely to troubleshoot problems you may have.
  • Check the responses generated for specific requests.
  • Save and share logged messages with other users.
  • Examine protocol data that is not stored elsewhere.
 

(Prerequisite): Enable logging

Enable message logging for a virtual service.

In the Virtual Service Editor, under Service Debugging, toggle the Message Logging switch to Enabled.

Note:  

  • The message logging state (enabled/disabled) in the Designer or Service Virtualization Management is loaded when the virtual service is first opened. If the state is changed in the Designer or SVM, the state change may not display in the other instance of the Designer or SVM until the service page is reopened.

  • Message logs store raw message data. If you configure data masking in the virtual service, message logging will be automatically disabled.

    You can modify the default behavior, so that messages will be logged and a warning written to the Problem List. To enable message logging even if data masking is configured in the virtual service, edit the following line in the Designer or Server application configuration file:

    <add key="MessageLogger.LogMessagesWithDataMaskingEnabled" value="False" />

    Set value="True".

Back to top

View log files in the Designer message viewer

In the Virtual Service Editor, under Service Debugging, click Show Service Logs to open the message viewer.

By default, the message viewer displays 20 request and response pairs in the list. To view more items, click Fetch more items.

Filtering: Use the filter options to limit the messages displayed. By default, the viewer displays messages from the current date, or the last date on which messages were logged.

Back to top

Access log files stored on the file system

Log files are stored in the following locations:

  • For a service running on the embedded server: Messages are stored in the Designer log folder %APPDATA%\Micro Focus\Service Virtualization Designer\logs\ in the subfolder messages\[Virtual Service Name]-[Virtual Service ID], created when the first message is logged.

    To open the Designer log folder, from the Windows Start menu, select Service Virtualization > Designer > Designer Log Folder.

  • For a service running on a Service Virtualization Server: Messages are stored in the Server log folder %ALLUSERSPROFILE%\Micro FOcus\Service Virtualization Server\logs\, in the subfolder messages\[Virtual Service Name]-[Virtual Service ID], created when the first message is logged.

    To open the Server log folder, from the Windows Start menu, select Service Virtualization > Server > Server Log Folder.

Each message is stored in a single file named message-[Message Order Number]-[Message Id].log.

Tip: If you do not have access to the Server machine directly, you can open the server logs in the Designer message viewer, and save them to your local machine. For details, see Message Logging.

Back to top

Save logs to your local machine

  1. In the Virtual Service Editor, under Service Debugging, click Show Service Logs to open the message viewer.
  2. Click Save raw [request/response] data and selection a location.

Back to top

Import logged messages to the Data Model

  1. In the Virtual Service Editor, under Service Debugging, click Show Service Logs to open the message viewer.
  2. Select messages to import.
  3. Go to the Data Model Editor and expand a rule. You can import messages into the Learned Data rule or a custom rule.
  4. Expand the rule, right-click inside the rule, and select Import Selected Logged Messages. You can select to import the request part of the messages, the response part, or entire messages.

Back to top

Set maximum message read size

To prevent logged messages that are too big to display, Service Virtualization configures a maximum size limit for messages that can be viewed in the Designer message viewer. You can modify the message size limit using the application configuration files.

  1. Navigate to the appropriate configuration file:

    • Service Virtualization Server configuration file: HP.SV.StandaloneServer.exe.config, located on the Service Virtualization Server machine in the server installation folder. By default, C:\Program Files\Micro Focus\Service Virtualization Server\Server\bin.

    • Designer configuration file: VirtualServiceDesigner.exe.config, located on the Designer machine in the installation folder. By default, C:\Program Files\Micro Focus\Service Virtualization Designer\Designer\bin\.
  2. Modify the value in the following line:

    <add key="MessageLogger.MaxReadMessageSize" value="20000"/>

    The value is in kilobytes (kb).

Back to top