TRACELOG        Control the trace log file

Top  Previous  Next

Syntax:

TRACELOG

[ file name ]  |  [ /options ]

Arguments:

[ file name ]

Optional variable or string defining a file or path name; if no path is defined FileLink’s working folder is used.

Options:

/append

Specify that trace data is to be appended to preexisting [ file name ] (if any); if the file does not exist, it will be created.

 

/maxsize=xx

Specify the maximum size of the trace log file (in Kilobytes).

 

/new

Specify that a new trace log file name is to be created (based on the current date and time) when this command is executed and whenever an existing trace log file reaches the maximum size (if a size has been specified).

 

/off

Turn trace logging off.

 

/on

Turn trace logging on

 

 

If the [ file name ] argument is present, this script command creates a new trace log file by this name. It is also implied that logging is to be turned on. The trace log file records trace and diagnostic messages that may be helpful in troubleshooting file transfer failures.

 

The /new option instructs FileLink to create new trace file name using the current date and time. Such a file will be created when the command is executed and, if the /maxsize option is also specified, whenever the trace file exceeds this maximum size. The [ file name ] argument must be present, but it can be an empty string. FileLink takes the base file name (i.e., the part of the file name before any extension) and appends the current date and time in the fashion shown below. Notice that if no extension is originally specified, FileLink appends .log to the final file name.

 

       TRACELOG "trace" /new  

       // creates trace file = trace_Wed Oct 30 15.38.43 2002.log

 

       TRACELOG "trace.txt" /new  

       // creates trace file = trace_Wed Oct 30 15.38.43 2002.txt

 

       TRACELOG "trace.xx.log" /new  

       // creates trace file = trace_Wed Oct 30 15.38.43 2002.xx.log

 

       TRACELOG "" /new  

       // creates trace file = Wed Oct 30 15.38.43 2002.log

 

The /maxsize option limits the maximum size that a trace file can grow to. The size is specified in kilobytes. When the maximum size is reached, FileLink handles this condition in one of two ways. If /new is also specified, the current trace file is simply closed and a new file is created using the convention described above. If /new is not present, FileLink toggles between two files. When the first file is full, it is closed and a second created and written to. When the second file is full, it is closed and the first file is reopened, cleared, and logging continues. This alternating between files continues until FileLink terminates. When /maxsize is present, [ file name ] is altered as shown below. Notice that if no extension is originally specified, FileLink appends .log to the final file name.

 

       TRACELOG "trace" /maxsize=100  

       // creates trace file = trace_1.log

       // this alternates with a file to be named trace_2.log

 

       TRACELOG "trace.txt" / maxsize=100

       // creates trace file = trace_1.txt

       // this alternates with a file to be named trace_2.txt

 

The /append option instructs FileLink to append new trace log data to a previously existing file specified by [ file name ]. If [ file name ] does not exist, it will created. The /append option may be combined /maxsize but may not be used with the /new option.

 

If [ file name ] is omitted, the /on and /off options control logging to a previously defined log file. When logging is turned on, new log messages are appended to the existing log file. For example:

 

       TRACELOG /off

 

Related Command(s): LOG, WORKINGDIR, TRACEWIN