This extension connects to Virtualize's event monitoring component and logs events in a file on disk. In this section:
Requirements
- Virtualize 9.10 or later (including SOAtest/Virtualize combined distributions)
Installation
There are two approaches for installing the extension:
- Extract the .zip from marketplace into the Virtualize desktop root installation (same directory as the soavirt or virtualize executable).
- Extract the .zip to any location. This approach requires Java to be installed on the path in order to run.
Running the Tool
Use the scripts shipped with the tool to start and stop it.
To start: run the loggerstart.<bat|sh>
To stop: run the loggerstop.<bat|sh>
Configuration
You can customize connections, output and configure the following settings in the logger.properties file.
consumerId=<logger_name>
The property sets the name of the consumer ID and is used when connecting to ActiveMQ. It changes to the name of the JMS consumer when connecting to the event broker. Do not change from the default unless it is required.
Default is logger.
desktopEdition=<true|false>
Set to true
when connecting to a licensed desktop distribution of Virtualize. Setting to false
will result in the logger accessing the REST API to get the broker connection information.
Default is true
.
host=<host>
Specifies the Virtualize host for establishing the connection.
Default is localhost
.
virtualizePort=<port>
Specifies the Virtualize port for accessing the REST API that fetches the broker settings. Use when desktopEdition=false
.
Default is 9080
.
activeMQPort=<port>
Specifies the port for connecting to the event monitoring broker. Use when desktopEdition=true
.
Default is 9617
.
logDirectory=<path>
Specifies the absolute file path where log files will be written. This setting is required.
logName=<file_name>
The name of the file to log to when logging to a single file
Default is events.log
.
logAsOneFile=<true|false>
Specifies whether the logger writes to a single or multiple files. Set to false
to create a separate file per event.
Default is false
.
logAsOneLine=<true|false>
Specifies whether the event contents should be compressed into a single line or should include line breaks.
Default is false
.
logTimestamp=<true|false>
Specifies whether a timestamp of when the logger logged the event (local time) should be included.
Default is true
.
logEventTimestamp=<true|false>
Specifies whether a timestamp of when the event occurred on the server (server time) should be included as part of the event output in the log.
Default is true
.
logVirtualizeInfo=<true|false>
Specifies if info-level events should be logged.
Default is true
.
logHeaders=<true|false>
Specifies if the event header section should be included in the event output.
Default is true
.
logBody=<true|false>
Specifies if the event body section should be included in the event output.
Default is true
.
logDelimiter=|
Specifies the delimiter character used between sections (timestamp, header,body, etc.) when logging to single line.
Default is |
shutdownPort=<port>
Specifies the port that the logger waits for a connection on to indicate it should shutdown.
Default is 9700
.
Example Configuration
You can use the following example configuration as a starting point for your logger.properties file:
consumerId=logger desktopEdition=true host=localhost #virtualizePort=9080 activeMQport=9617 logDirectory=C:\\User\logs\ logName=events.log logAsOneFile=true logAsOneLine=false logTimestamp=true logEventTimestamp=true logVirtualizeInfo=true logHeaders=true logBody=true logDelimter=| shutdownPort=9700