Please enable JavaScript to view this site.

Take Command / TCC Help v. 29

Purpose:Save a log of commands to a 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.
ONTurns on logging
OFFTurns off logging



See also: HISTORY.




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


Command Log

Error Log

History Log

Output Log


If you don't specify a log type, LOG defaults to command logging. You can only specify one of the /A, /E, and /H options in a single LOG command.


You can have any combination of the four logging methods running simultaneously.


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, and command is the actual command after any alias or variable expansion.


The default command log filename is TCCommandLog. See also %_LOGFILE.


Error Log


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


History Log


History logging 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. See also %_HLOGFILE.


Output Log


The Output log saves everything that TCC writes to the console window. It does not log output written by external applications.




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.




/=Display the LOG command dialog to help you set the command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.


/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.