Keil™, An ARM® Company

µVision User's Guide

legacy

SLOG

SyntaxDescription
SLOG > path filenameCreates the file filename as a log file. Input and output from the Serial window is written to this file.
SLOG >> path filenameOpens an existing log file named filename for appending log information. If filename does not exist, it is created. Input and output from the Serial window is appended to this file.
SLOGDisplays the status of the log file.
SLOG OFFCloses the log file.

Use the SLOG command to create, append to, check status, or close a log file. Input and output displayed in the Serial window is copied to the log file. The filename you specify may contain a driver letter and path specification. Filenames may be entered as character strings, for example,c:\usr\tmp\logfile.

Example
SLOG >C:\TMP\dslog                     /* Create a new log file       */
SLOG                                   /* Interrogate log file status */
 serial log file: C:\TMP\dslog
SLOG OFF                               /* Close the log file          */