Using the Analytics command log
Analytics includes a powerful logging feature that serves two main purposes:
- Tracking analysis
The log records the exact sequence of commands executed during each Analytics session, and saves them as part of the Analytics project. Recording the sequence of commands ensures that audit steps can be verified and replicated whenever necessary.
- Recording Analytics command syntax
The log records the ACLScript syntax used to execute each command. Having access to the exact syntax allows you to:
- easily rerun commands from the log instead of manually recreating them through the user interface
- create scripts based on selected log entries
- view and learn the ACLScript syntax associated with commands accessed through the user interface
Add sessions to the log
A new session is automatically created in the log each time you open an Analytics project. Each session includes the date and a timestamp indicating when the session started.
You can also manually add a session to the log whenever you want to create a group of log entries. For example, you might want to add a distinct session for each stage of audit analysis you perform.
When you manually add a session you have the option of including a session name.
- Right-click in the Log tab and select Add New Session.
- (Optional) In the Session
Name text box, type a name to identify the session.
Session names can be a maximum of 30 characters.
- Click OK.
Add comments to the log
You can manually add comments to the Analytics command log. Use comments to document steps in your analysis, and to add explanations or descriptions that are relevant to the audit project. When you add a comment it is added as the last item in the log.
- Select Tools > Comment.
- Enter the text of the comment in the Comment text
box and click OK.
Single-line comments are displayed in the log treeview. To view multiline comments, double-click the comment entry in the treeview.
Search the log
You can search the log for particular command names or strings in log entries and session entries.
- Click the Log tab in the Navigator.
- Right-click the log entry where you want to start the search and click Find.
- In the Find dialog box, in the Find what field, enter the search string.
- Specify any of the Find options, as required:
Option Description Match whole word only Only exact matches are found.
For example, a search for “SET L” does not match “SET LEARN” if this option is selected, but it would otherwise.
Match case Only matches with exactly matching upper and lower case are found.
For example, a search for “Comment” does not match “COMMENT” if this option is selected, but it would otherwise.
Up, Down Specifies the search direction.
- Click Find Next.
If a match is found, the first log entry that contains the search string is highlighted. Click Find Next to navigate to the next match.
Copy log entries
You can copy log entries to the clipboard, and then paste the entries into the Script Editor or Workspace Editor in Analytics, or into another application. Copying entries from the log is an alternative to exporting the entries to a new file or a script.
- Click the Log tab in the Navigator.
- Select the checkbox beside each log entry that you want to
copy.
You can select:
- individual entries
- log sessions
- date ranges
- the entire log
If you select a log session or date range, all sub-entries are also automatically selected.
- Right-click in the Log tab and
select Copy.
The log entries are copied to the Windows clipboard.
- Paste the log entries into a destination.
Export log entries
You can export Analytics log entries, or the entire contents of the log, to an external file, or to a new Analytics script in the current project.
- Click the Log tab in the Navigator.
- Select the checkbox beside each log item that you want to
export.
You can select:
- individual entries
- log sessions
- date ranges
- the entire log
If you select a log session or date range, all sub-entries are also automatically selected.
-
Right-click in the Log tab and select Save Selected Items > [Export Type] where Export Type is one of the following options:
Export Type Description HTML an HTML file (.htm) Log File a new Analytics log file (.log) Script a new Analytics script in the current project WordPad a temporary new file in WordPad Text a text file (.txt) - Specify a file name or a script name and click Save or OK.
To save a temporary WordPad file, use Save as in WordPad.
Delete log entries
You can delete the following entries from the log:
- individual entries
- log sessions
- date ranges
- the entire log
If you select a log session or date range, all sub-entries are also automatically selected.
When you delete a portion of the log, or the entire log, the following comment is automatically inserted at the point of deletion: A range of the Log has been deleted.
- Click the Log tab in the Navigator.
- To delete all entries in the log:
- Right-click in the Log tab and select Delete Entire Log.
- Click OK in the confirmation dialog box.
- To delete individual entries:
- Select the checkbox beside each entry, session, or date range you want to delete.
- Right-click and select Delete Selected Items.
- Click OK in the confirmation dialog box.
Rerun commands from the log
You can select any single-line command in the log and rerun it from the command line.
You can also select and rerun the multiline version of the DEFINE FIELD...COMPUTED command. Other multiline commands, such as GROUP, cannot be rerun from the command line and can only be run in scripts.
When you rerun commands you can run them as is, or modify them before running them.
- Click the Log tab in the Navigator.
- Click the log entry with the command
you want to rerun.
The command prefills the Command Line near the top of the Analytics interface, just below the toolbar.
Note
If the Command Line isn't visible, select Window > Command Line from the Analytics main menu.
- If required, edit the command in the Command Line text box.
- Click Run
.