最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

SecureCRT的日志设置

工作和技术 crifan 5335浏览 0评论

SecureCRT的日志设置

想要每次都主动弹出对话框,并记录相关的log日志:
Options->Session Options->Terminal->Log File
中,选中
Prompt for filename
Start log upon connect
这样,每次连接一个session的时候,都会弹出对话框,让你选择保存到哪个日志文件。

并且希望日志文件名可以自动按照日期生成,可以如下设置:
将文件名写成:%Y%M%D%h%m%s_%S.log
这样,每次弹出的时候,就自动生成了对应的文件名,比如此处的20090520100519_Serial-COM1.log

另外,最好选中Append to file,这样,之后的日志都可以追加到已有的日志文件而不会讲原先的文件清空了。

【附录】
SecureCRT的相关Help内容:

    Terminal / Log File


The Log File category of the Session Options dialog allows you to customize the logging options for the selected session

.

Log file group

This section lets you specify a default filename for your log file. You can also use the Browse button to open the Save As dialog and select the path or filename. You can also use the following variables which will be expanded when SecureCRT writes to the log file.

%H – hostname

%S – session name

%Y – four-digit year

%M – two-digit month

%D – two-digit day of the month

%h – two-digit hour

%m – two-digit minute

%s – two-digit seconds

%% – percent (%)

%envvar% – environment variable

Note: The environment variable substitution occurs first.

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.

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.

Overwrite vs. Append

You can set up logging to continuously append information to the end of the existing log file or you can overwrite the existing log file with the new session’s logging information.

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.

转载请注明:在路上 » SecureCRT的日志设置

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. hao
    75652682114年前 (2011-07-05)回复
82 queries in 0.179 seconds, using 22.09MB memory