From: Lee Date: Sat, 23 Jul 2016 17:23:43 +0000 (+0000) Subject: Log when privoxy is toggled on or off via cgi interface. X-Git-Tag: v_3_0_26~46 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=acd20504909d364d41154a3350be11b445369b0c Log when privoxy is toggled on or off via cgi interface. Highlight the "Info: Now toggled " on/off log message in the windows log viewer. --- diff --git a/cgiedit.c b/cgiedit.c index 0ffa8bb2..4579b35b 100644 --- a/cgiedit.c +++ b/cgiedit.c @@ -1,4 +1,4 @@ -const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.87 2014/10/18 11:31:52 fabiankeil Exp $"; +const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.88 2016/02/26 12:29:38 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $ @@ -4407,6 +4407,8 @@ jb_err cgi_toggle(struct client_state *csp, global_toggle_state = !global_toggle_state; } + log_error(LOG_LEVEL_INFO, "Now toggled %s.", global_toggle_state ? "ON" : "OFF"); + if (NULL == (exports = default_exports(csp, "toggle"))) { return JB_ERR_MEMORY; diff --git a/w32log.c b/w32log.c index c524ffa2..b3aee2ce 100644 --- a/w32log.c +++ b/w32log.c @@ -1,4 +1,4 @@ -const char w32log_rcs[] = "$Id: w32log.c,v 1.48 2012/05/27 15:45:05 fabiankeil Exp $"; +const char w32log_rcs[] = "$Id: w32log.c,v 1.49 2015/12/27 12:53:54 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32log.c,v $ @@ -41,6 +41,7 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.48 2012/05/27 15:45:05 fabiankeil E #ifndef STRICT #define STRICT #endif +#include /* i686-w64-mingw32-gcc compiler warning if winsock2.h is included after windows.h */ #include #include @@ -56,11 +57,6 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.48 2012/05/27 15:45:05 fabiankeil E const char w32res_h_rcs[] = W32RES_H_VERSION; -#ifdef __MINGW32__ -#include "cygwin.h" -const char cygwin_h_rcs[] = CYGWIN_H_VERSION; -#endif - const char w32log_h_rcs[] = W32LOG_H_VERSION; #ifndef _WIN_CONSOLE /* entire file */ @@ -172,6 +168,7 @@ static struct _Pattern { "Connect: Reusing server socket", STYLE_HIGHLIGHT }, { "Connect: Created new connection to", STYLE_HIGHLIGHT }, { "hung up on us", STYLE_HIGHLIGHT }, + { "Info: Now toggled ", STYLE_HIGHLIGHT }, { "Crunching Referer:", STYLE_HIGHLIGHT }, /* what are all the possible error strings?? */ { "Error:", STYLE_HIGHLIGHT },