2.2.69. LOG

The LOG command records user input and places it in a specified file.

Syntax

LOG [/A] [OFF | ON="filename"]

where:

/A

Specifies that new records are to be added to any that already exist in the specified file.

OFF

Closes the log file and stops collecting information.

ON

Starts writing information to the log file.

filename

Specifies the name of the log file. Quotation marks are optional if the filename contains only alphanumeric characters or periods. Filenames that contain a leading slash must be in double quotation marks ("/filename", for example). Filenames that contain a leading backslash must be in single quotation marks ('\filename', for example). If you do not supply a filename extension, the extension .log is used by default.

Description

This command records user input and places it in a specified file. Commands that are issued but not successfully completed are written to the log file as comments along with the associated error codes. All successful commands are written to the log file, so the file can be used as an include file.

If the specified file exists and you do not specify the /A parameter, the existing contents of the file are overwritten and lost. A window number (28) is associated with the log file so that text can be written to it using FPRINTF.

Using LOG with no parameters shows the current log file, if any. User input is recorded in the log file until the LOG OFF command is issued.

The LOG command runs asynchronously unless in a macro.

Example

The following examples show how to use LOG:

LOG ON=’c:\temp\log.txt’

Start logging output to the file c:\temp\log.txt, overwriting any existing file of that name.

LOG /A ON="log"

Start logging output to the file log.log in the current directory of the debugger, appending the new log text to the file if it already exists.

LOG OFF

Stop logging output.

See also

The following commands provide similar or related functionality:

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0235B
Non-Confidential