The Log File category of the Session Options dialog allows you to customize the logging options for the selected session .
Log file name group
This section allows you to specify a default filename for your log file. You can enter a path or filename, or you can use the Browse button to open the Save As dialog and select the path or filename. You can also include any of the variables listed in the Substitution section below. These variables will be expanded when SecureCRT writes to the log file.
Options group
This section lets you specify log file behaviors.
Prompt for filename
Check this option to prompt the user for the session log filename when the log is started.
Start log upon connect
Check this option to start writing to the session log file whenever a connection is made. By default, this option is not selected.
Overwrite file
If this option is selected and the session log file already exists, the current log file will be overwritten by the new session log file.
Append to file
If this option is selected and the session log file already exists, the new session log will be appended to the existing log file. If the log file does not already exist, a new file is created.
Raw log
Check this option to write every character received by SecureCRT, including terminal escape sequences, to the session log file. By default, this option is off.
Start new log file at midnight
Check this option to have SecureCRT start a new log file each night at midnight. Using this feature can aid in automatic log rotation.
Trace level
This option allows the user to specify the trace level for the log file. Valid values are 0 to 9 (most verbose).
Custom log data group
This section lets you specify custom messages to be written to the log file. You can include any of the variables listed in the Substitution section below. These variables will be expanded when SecureCRT writes to the log file. Additionally, "%e" can be used to insert a newline in the custom log data.
Upon connect
Entries in this box will be written to the log file when the session connects.
Upon disconnect
Entries in this box will be written to the log file when the session disconnects.
On each line
Entries in this box will be written to each line of the log file.
Log only custom data
If this option is selected, SecureCRT will log only the custom data from the three fields above. All normal log messages will be suppressed.
Substitutions group
In the dialog, this section lists some of the variables that SecureCRT can expand when writing to the log file. A complete list is shown below.
%H - hostname (not valid with protocols that do not specify a host, such as Serial)
%S - session name
%Y - four-digit year
%y - two-digit year
%M - two-digit month
%D - two-digit day of the month
%P - port
%h - two-digit hour
%m - two-digit minute
%s - two-digit seconds
%t - three-digit milliseconds
%F - directory path starting below the "Sessions" folder
%% - percent (%)
%envvar% - environment variable
Note: The environment variable substitution occurs first.
Related Topics