mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-24 16:52:24 +00:00
Abe Crabtree complains that flushing the log file as often as we do in 0.56
results in unacceptable performance for him on Win2000. Add a checkbox to revert to the old behaviour. [originally from svn r4988] [this svn revision also touched putty-wishlist]
This commit is contained in:
parent
89f4cf6a0a
commit
a2e01a5604
3
config.c
3
config.c
@ -885,6 +885,9 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
|
|||||||
"Always overwrite it", I(LGXF_OVR),
|
"Always overwrite it", I(LGXF_OVR),
|
||||||
"Always append to the end of it", I(LGXF_APN),
|
"Always append to the end of it", I(LGXF_APN),
|
||||||
"Ask the user every time", I(LGXF_ASK), NULL);
|
"Ask the user every time", I(LGXF_ASK), NULL);
|
||||||
|
ctrl_checkbox(s, "Flush log file frequently", 'u',
|
||||||
|
HELPCTX(logging_flush),
|
||||||
|
dlg_stdcheckbox_handler, I(offsetof(Config,logflush)));
|
||||||
|
|
||||||
if ((midsession && protocol == PROT_SSH) ||
|
if ((midsession && protocol == PROT_SSH) ||
|
||||||
(!midsession && backends[3].name != NULL)) {
|
(!midsession && backends[3].name != NULL)) {
|
||||||
|
@ -206,6 +206,22 @@ Finally (the default option), you might not want to have any
|
|||||||
automatic behaviour, but to ask the user every time the problem
|
automatic behaviour, but to ask the user every time the problem
|
||||||
comes up.
|
comes up.
|
||||||
|
|
||||||
|
\S{config-logflush} \q{Flush log file frequently}
|
||||||
|
|
||||||
|
\cfg{winhelp-topic}{logging.flush}
|
||||||
|
|
||||||
|
This option allows you to control how frequently logged data is
|
||||||
|
flushed to disc. By default, PuTTY will flush data as soon as it is
|
||||||
|
displayed, so that if you view the log file while a session is still
|
||||||
|
open, it will be up to date; and if the client system crashes, there's
|
||||||
|
a greater chance that the data will be preserved.
|
||||||
|
|
||||||
|
However, this can incur a performance penalty. If PuTTY is running
|
||||||
|
slowly with logging enabled, you could try unchecking this option. Be
|
||||||
|
warned that the log file may not always be up to date as a result
|
||||||
|
(although it will of course be flushed when it is closed, for instance
|
||||||
|
at the end of a session).
|
||||||
|
|
||||||
\S{config-logssh} Options specific to SSH packet logging
|
\S{config-logssh} Options specific to SSH packet logging
|
||||||
|
|
||||||
These options only apply if SSH packet data is being logged.
|
These options only apply if SSH packet data is being logged.
|
||||||
|
1
putty.h
1
putty.h
@ -452,6 +452,7 @@ struct config_tag {
|
|||||||
Filename logfilename;
|
Filename logfilename;
|
||||||
int logtype;
|
int logtype;
|
||||||
int logxfovr;
|
int logxfovr;
|
||||||
|
int logflush;
|
||||||
int logomitpass;
|
int logomitpass;
|
||||||
int logomitdata;
|
int logomitdata;
|
||||||
int hide_mouseptr;
|
int hide_mouseptr;
|
||||||
|
@ -167,6 +167,7 @@ void save_open_settings(void *sesskey, int do_host, Config *cfg)
|
|||||||
write_setting_filename(sesskey, "LogFileName", cfg->logfilename);
|
write_setting_filename(sesskey, "LogFileName", cfg->logfilename);
|
||||||
write_setting_i(sesskey, "LogType", cfg->logtype);
|
write_setting_i(sesskey, "LogType", cfg->logtype);
|
||||||
write_setting_i(sesskey, "LogFileClash", cfg->logxfovr);
|
write_setting_i(sesskey, "LogFileClash", cfg->logxfovr);
|
||||||
|
write_setting_i(sesskey, "LogFlush", cfg->logflush);
|
||||||
write_setting_i(sesskey, "SSHLogOmitPasswords", cfg->logomitpass);
|
write_setting_i(sesskey, "SSHLogOmitPasswords", cfg->logomitpass);
|
||||||
write_setting_i(sesskey, "SSHLogOmitData", cfg->logomitdata);
|
write_setting_i(sesskey, "SSHLogOmitData", cfg->logomitdata);
|
||||||
p = "raw";
|
p = "raw";
|
||||||
@ -395,6 +396,7 @@ void load_open_settings(void *sesskey, int do_host, Config *cfg)
|
|||||||
gppfile(sesskey, "LogFileName", &cfg->logfilename);
|
gppfile(sesskey, "LogFileName", &cfg->logfilename);
|
||||||
gppi(sesskey, "LogType", 0, &cfg->logtype);
|
gppi(sesskey, "LogType", 0, &cfg->logtype);
|
||||||
gppi(sesskey, "LogFileClash", LGXF_ASK, &cfg->logxfovr);
|
gppi(sesskey, "LogFileClash", LGXF_ASK, &cfg->logxfovr);
|
||||||
|
gppi(sesskey, "LogFlush", 1, &cfg->logflush);
|
||||||
gppi(sesskey, "SSHLogOmitPasswords", 1, &cfg->logomitpass);
|
gppi(sesskey, "SSHLogOmitPasswords", 1, &cfg->logomitpass);
|
||||||
gppi(sesskey, "SSHLogOmitData", 0, &cfg->logomitdata);
|
gppi(sesskey, "SSHLogOmitData", 0, &cfg->logomitdata);
|
||||||
|
|
||||||
|
@ -4337,7 +4337,8 @@ static void term_out(Terminal *term)
|
|||||||
}
|
}
|
||||||
|
|
||||||
term_print_flush(term);
|
term_print_flush(term);
|
||||||
logflush(term->logctx);
|
if (term->cfg.logflush)
|
||||||
|
logflush(term->logctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#define WINHELP_CTX_logging_main "logging.main"
|
#define WINHELP_CTX_logging_main "logging.main"
|
||||||
#define WINHELP_CTX_logging_filename "logging.filename"
|
#define WINHELP_CTX_logging_filename "logging.filename"
|
||||||
#define WINHELP_CTX_logging_exists "logging.exists"
|
#define WINHELP_CTX_logging_exists "logging.exists"
|
||||||
|
#define WINHELP_CTX_logging_flush "logging.flush"
|
||||||
#define WINHELP_CTX_logging_ssh_omit_password "logging.ssh.omitpassword"
|
#define WINHELP_CTX_logging_ssh_omit_password "logging.ssh.omitpassword"
|
||||||
#define WINHELP_CTX_logging_ssh_omit_data "logging.ssh.omitdata"
|
#define WINHELP_CTX_logging_ssh_omit_data "logging.ssh.omitdata"
|
||||||
#define WINHELP_CTX_keyboard_backspace "keyboard.backspace"
|
#define WINHELP_CTX_keyboard_backspace "keyboard.backspace"
|
||||||
|
Loading…
Reference in New Issue
Block a user