X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/65f66c88084c7dc925c48f7441a7e4330451f2cd..8c7d710ce382c85e38ce4fb73fd357e00e7d5ed2:/unix/uxcons.c diff --git a/unix/uxcons.c b/unix/uxcons.c index 881b6bfe..5e3949b3 100644 --- a/unix/uxcons.c +++ b/unix/uxcons.c @@ -16,6 +16,8 @@ int console_batch_mode = FALSE; +static void *console_logctx = NULL; + /* * Clean up and exit. */ @@ -258,9 +260,15 @@ void old_keyfile_warning(void) fputs(message, stderr); } +void console_provide_logctx(void *logctx) +{ + console_logctx = logctx; +} + void logevent(void *frontend, const char *string) { - log_eventlog(logctx, string); + if (console_logctx) + log_eventlog(console_logctx, string); } int console_get_line(const char *prompt, char *str,