trace-logging-20040721
authorJeffrey Altman <jaltman@mit.edu>
Wed, 21 Jul 2004 22:41:33 +0000 (22:41 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 21 Jul 2004 22:41:33 +0000 (22:41 +0000)
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.

doc/txt/winnotes/registry.txt
src/WINNT/client_osi/osilog.c

index e49341b..062e503 100644 (file)
@@ -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}
index 72fbecb..c9af7a3 100644 (file)
@@ -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);