From: Jeffrey Altman Date: Wed, 21 Jul 2004 22:41:33 +0000 (+0000) Subject: trace-logging-20040721 X-Git-Tag: openafs-devel-1_3_66~25 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9bc1b6a7b9f09922d2a097b36e4e5f8d763eaece;p=packages%2Fo%2Fopenafs.git trace-logging-20040721 TraceLogging is supposed to be activated for different purposes with bit flags. The osi log and afslogon both used the same bit flag. Bit 0 is now for afslogon; and Bit 1 is for osi log. --- diff --git a/doc/txt/winnotes/registry.txt b/doc/txt/winnotes/registry.txt index e49341be2..062e50361 100644 --- a/doc/txt/winnotes/registry.txt +++ b/doc/txt/winnotes/registry.txt @@ -265,10 +265,13 @@ Variable: HardDeadtimeout Value : TraceOption -Type : DWORD {1|0} +Type : DWORD {0, 1, 2, 3} Default : 0 - Enables trace events for the AFS client and network provider. + Enables logging of debug output to the Windows Event Log. + Bit 0 enables logging of "Logon Events" processed by the Network Provider + and Winlogon Event Notification Handler. + Bit 1 enables logging of events captured by the AFS Client Service. Value : AllSubmount Type : DWORD {0, 1} diff --git a/src/WINNT/client_osi/osilog.c b/src/WINNT/client_osi/osilog.c index 72fbecbd1..c9af7a38f 100644 --- a/src/WINNT/client_osi/osilog.c +++ b/src/WINNT/client_osi/osilog.c @@ -342,8 +342,8 @@ void osi_LogDisable(osi_log_t *logp) } #define REG_CLIENT_PARMS_KEY "SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters" -#define TRACE_OPTION_EVENT 1 -#define ISLOGONTRACE(v) ( ((v) & TRACE_OPTION_EVENT)==TRACE_OPTION_EVENT) +#define TRACE_OPTION_EVENT 2 +#define ISCLIENTTRACE(v) ( ((v) & TRACE_OPTION_EVENT)==TRACE_OPTION_EVENT) DWORD osi_TraceOption=0; @@ -364,7 +364,7 @@ void osi_LogEvent0(char *a,char *b) { HANDLE h; char *ptbuf[1]; - if (!ISLOGONTRACE(osi_TraceOption)) + if (!ISCLIENTTRACE(osi_TraceOption)) return; h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); ptbuf[0] = b; @@ -377,7 +377,7 @@ void osi_LogEvent(char *a,char *b,char *c,...) { HANDLE h; char *ptbuf[1],buf[MAXBUF_+1]; va_list marker; - if (!ISLOGONTRACE(osi_TraceOption)) + if (!ISCLIENTTRACE(osi_TraceOption)) return; h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); va_start(marker,c);