Importing a log file

To import a log file so that you can analyze and correlate it with other log files:

  1. Select File > Import.... The Import wizard opens to the Select page.
  2. From the list of import source types, select Log File. Click Next. The Import Log File page opens.
  3. Add log files to be imported by clicking Add.
  4. Select the type of log. Click the Host tab.
  5. Select either the local host or a remote host from the Default Hosts list. Click the Details tab.
  6. Type the path of the file being imported.
     

    Note 1: This path is case sensitive on all platforms, including Windows. Use the browse button to locate the desired file to avoid case problems.


    Note 2: You can import multiple log files of the same type located in a single directory at once by specifying a regular expression in double quotes in the log file path field. For example, to import all the logs in the d:\temp directory, enter d:\temp\".*" in the field. Follow the regular expression rules of java.util.regex.Pattern.

     

  7. Select the version details of the program that created the log.
  8. Click the Destination tab.
  9. Input the destination project in the Project field and the name for the grouping logical unit in the Monitor field.
  10. Specify whether the destination is an existing log file.  If it replaces an existing file or appends to one, follow these steps:
    1. Select the check box Merge the log file with an existing log file in the workspace.
    2. Select the log file that will be replaced or appended.  Click Next.
    3. Choose whether to Replace or Append. Click OK.
  11. Click the Filter tab. Filtering lets you reduce the number of log records imported from the log file by specifying filtering criteria. If you specify nothing on this tab, all log records are imported from the selected log file.
  12. Optional: Select an already-defined filter, or create a new filter for this file. To create a filter so that only certain log records are imported, follow these steps:
    1. Click New.
    2. Select the Import Log type. Click OK.
    3. In the Edit Filter dialog, specify a Filter name. This name will appear on the Filter tab's selection list so that you can apply this filter to any log file you import.
    4. Define your filter by using one or both of the Filter mechanisms on the two tabs: Standard or Advanced. The Standard tab lets you quickly set some simple, common filters. The Advanced tab lets you create highly customized filters.
    5. To define a standard filter:
      1. Click the Filter by events check box if you want to import a certain number or timeframe of events at the start or end of the log file. Then, in the first field, select if you want to import events from the start (first) or end (last) of the log file. In the third field, select if you want to import a certain number of seconds or a certain number of events. In the second field, enter the number of seconds or events you want to import.
         

        For example, if you want to import 400 events from the start of the log file, the Show line would read: first 400 events. If you want to import events during the last 10 seconds of the log file, the Show line would read: last 10 seconds.

      2. Click the Show events by severity check box if you want to import log records of certain severities. Then click the check boxes next to Errors, Warnings, and Information to indicate which types to import.
    6. To define an advanced filter:
      1. Click the Advanced tab. The Advanced filtering table shows all the filter criteria defined, if any. Log records that match one or more of the criteria will be imported.
      2. To add an entry in the table, click Add. Select the attribute you want to filter on from the list of primary Common Base Event attributes. Select the operator (like performs a pattern match). Enter a value that log records must have for that attribute in order to be imported:
        • Use an asterisk (*) to represent any string.
        • Use a bar (|) to represent a non-exclusive "or".
        • Time values must be in the ISO format of yyyy-mm-dd hh:mm:ss.sTZD, where:
          • yyyy is a four-digit year value
          • mm is a two digit month value
          • dd is a two digit day value
          • hh is a two digit hour value on a 24-hour clock
          • mm is a two digit minute value
          • ss.s is a two digit seconds value, with optional fractional seconds after the decimal
          • TZD is a time zone designator, either an 6-character time relative to Coordinated Univeral Time (UTC) such as +05:00 or -07:00; or a time zone abbreviation such as EST or GMT. See http://www.w3.org/TR/NOTE-datetime for information about the format, and http://www.timeanddate.com/library/abbreviations/timezones/ for a listing of time zone abbreviations.

        Click OK.

      3. To edit an existing entry, select it, click Edit and modify the fields.
      4. To remove an entry, select it and click Remove.
    7. Click OK.
  13. Click Finish to import the log file.

Depending on the size of the log file, it may take some time to import it. To view the status of the import, click the Progress button The progress button in the bottom right-hand corner of the workbench window. This will open the Progress view where you can see the progress of all active jobs. If you want to stop the import of a log, click the red Stop button next to the log name; all records will be imported up to the point where you stop it.

When the import has completed (or stopped), the imported file is opened in the Log view.

Log view showing Profiling Monitor on left and Log view with imported log file on the right

By default, all the imported log files will be serialized in a Default Log Set preference, which allows you to easily re-import the files.

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.

If you have imported a log file that includes an internal correlation (for example, some application server trace logs), a correlation object will be added to the Correlations list, with a generated name starting with the name of the association engine.

Related concepts
Determining problems in distributed applications using the Log and Trace Analyzer

Related tasks
Importing and using a symptom database
Working with a log file
Working with log sets
Exporting a log or correlation to a CBE XML file

Related references
Supported log file types