LOG

Print Topic  Return to Overview  Previous Topic  Next Topic 
Purpose:Save a log of commands to a disk file.

 

Format:LOG [/A /E /H /W file] [ON | OFF | text ]

 

fileThe name of the file to hold the log.
textAn optional message that will be added to the log.

 

/A(ll)/H(istory log)
/E(rrors)/W(rite to)

 

See also:  HISTORY.

 

Usage:

 

The LOG command provides independent controls for two different methods of logging TCC activity:

 

Command Log
History Log.

 

Command Log

 

Command logging creates a record of each internal and external command executed either from the command prompt or from a batch file in the format below:

 

[date time][id]  command

 

where the date and time are formatted according to the country code set for your system, id is the process ID in hexadecimal format, and command is the actual command after any alias or variable expansion.

 

The LOG command controls the command log operation if it does not include the /H option. The default command log filename is TCCommandLog.

 

You can only specify one of the /A, /E, and /H options in a single LOG command.

 

History Log

 

History log creates a record of each command executed from the command prompt exactly as it was entered, before aliases and variables are expanded, without any additional information.

 

The LOG command controls the history log operation if it includes the /H option.

 

Notes

 

The LOG /H output can be used as the basis for writing batch files. Start LOG /H, then execute the commands that you want the batch file to execute. When you are finished, turn LOG /H off. The resulting file can be turned into a batch file that performs the same commands with little or no editing.

 

Options:

 

/A This option saves all output to the log all file.  The default filename is TCLogAll.

 

/EThis option saves all error messages to the error log. The default filename is TCErrorLog. See also: the Error Logging configuration option.

 

/HThis option saves the commands to the history log. The default history log name is TCHistoryLog. For example, to turn on history logging and write to the file C:\LOG\HLOG:

 

log /h /w c:\log\hlog

 

/WThis switch specifies a different filename for the LOG output. It also automatically performs a LOG ON command. For example, to turn command logging on and write the log to C:\LOG\LOGFILE:

 

log /w c:\log\logfile

 

Once you select a new file name with the LOG /W or LOG /H /W command, LOG will use that file until you issue another LOG /W or LOG /H /W command, or until you terminate your TCC session. Turning LOG or LOG /H off or on does not change the file name.

 

Topic "log.htm" last edited 4/15/2008. ©2008  JP Software, Inc.
Keywords: LOG,HISTORY,LogName,HistLogName,LogOn,HistLogOn,LogErrors