From b9fc404bdf16fc3a61f13bffcaadc5d598d02cbd Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 28 Aug 2005 04:43:55 +0000 Subject: [PATCH] windows-default-trace-log-off-20050827 Now that OAFW is ready for a stable series, we will default "fs trace" to off on non-Debug builds. It can be set to on via the TraceOption registry value. (see registry.txt) --- doc/txt/winnotes/registry.txt | 3 ++- src/WINNT/afsd/afsd_init.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/txt/winnotes/registry.txt b/doc/txt/winnotes/registry.txt index 0dd7ca7689..15666c16c5 100644 --- a/doc/txt/winnotes/registry.txt +++ b/doc/txt/winnotes/registry.txt @@ -284,7 +284,7 @@ Variable: HardDeadtimeout Value : TraceOption -Type : DWORD {0-7} +Type : DWORD {0-15} Default : 0 Enables logging of debug output to the Windows Event Log. @@ -293,6 +293,7 @@ Default : 0 Bit 1 enables logging of events captured by the AFS Client Service. Bit 2 enables real-time viewing of "fs trace" logging with DbgView or similar tools. + Bit 3 enables "fs trace" logging on startup. Value : AllSubmount Type : DWORD {0, 1} diff --git a/src/WINNT/afsd/afsd_init.c b/src/WINNT/afsd/afsd_init.c index 151c289e8b..83e9d1e21d 100644 --- a/src/WINNT/afsd/afsd_init.c +++ b/src/WINNT/afsd/afsd_init.c @@ -653,7 +653,13 @@ int afsd_InitCM(char **reasonP) /* setup and enable debug log */ afsd_logp = osi_LogCreate("afsd", traceBufSize); afsi_log("osi_LogCreate log addr %x", (int)afsd_logp); - osi_LogEnable(afsd_logp); + if ((TraceOption & 0x8) +#ifdef DEBUG + || 1 +#endif + ) { + osi_LogEnable(afsd_logp); + } logReady = 1; osi_Log0(afsd_logp, "Log init");