mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 01:27:35 -05:00
Flush the logfile reasonably frequently in `printable output only' and
`all session data' modes, without completely mauling the performance, by fflush()ing once per term_out(). If anyone complains I suppose we can make this optional. [originally from svn r4445]
This commit is contained in:
10
logging.c
10
logging.c
@ -34,6 +34,16 @@ void logtraffic(void *handle, unsigned char c, int logmode)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Flush any open log file.
|
||||
*/
|
||||
void logflush(void *handle) {
|
||||
struct LogContext *ctx = (struct LogContext *)handle;
|
||||
if (ctx->cfg.logtype > 0)
|
||||
if (ctx->lgfp)
|
||||
fflush(ctx->lgfp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Log an Event Log entry. Used in SSH packet logging mode; this is
|
||||
* also as convenient a place as any to put the output of Event Log
|
||||
|
Reference in New Issue
Block a user