Testing the log parser in the Log and Trace Analyzer
Prerequisite
To test your log parser, open the Log and Trace Analyzer tool.
- Select File > Import.... The Import wizard opens to the Select page.
- From the list of import source types, select Log File. Click Next.
The Import Log File page opens.
- Add log files to be imported by clicking Add.
- Select the type of log from the Selected log files list. The value of the ui_name variable
you specified in the plugin.xml file for your log adapter should appear here.
- Click the Host tab.
- Select either the local host or a remote host from the Default
Hosts list.
- If you choose to import a log file from a remote host, ensure
that the Agent Controller is running and appropriately configured on the
remote host.
- If the required host is not in the list, type either its name or IP address in
the appropriate field and click Add.
Click the Details tab.
- Type the path of the file being imported.
- Select the version details of the server that created the log. Click the Destination tab.
- Input the destination project in the Project field and the name for
the grouping logical unit in the Monitor field.
- Specify whether the destination is an existing log file.
If it replaces an existing file or appends to one, follow these
steps:
- Select the check box Merge the log file with an existing log file in
the workspace.
- Select an existing log file for the merge. Click OK.
- If the log you are importing already exists in the workspace, a pop-up window will appear
with the options to append to the log file or to replace the log file.
Choose Replace or Append. Click OK. The imported file is then opened in the Log view.
By default, all the details for the imported log files will be saved in a Default Log Set,
which allows you to easily re-import the files. You can create new log sets, or open and edit
existing log sets.
Note: Ensure the version of the log you are importing matches
the application version selected in the Details tab. A mismatched
version number will cause the wrong parser to be used when the log is imported.
The Log Navigator view will list the log, but the Log view will be empty.
Related Concepts
Overview of the Hyades Generic Log Adapter
Common Base Event format specification
Related tasks
Creating a log parser
Creating a static adapter
Creating a rules-based adapter
Creating an adapter for external logging
Related references
Adapter Configuration File structure
Adapter Configuration Editor
Regular expression grammar