summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-08-03 01:11:16 +0000
committerSimo Sorce <idra@samba.org>2002-08-03 01:11:16 +0000
commit595145337ecd53441c1129d037be73c0f35fcb11 (patch)
tree30ab413da058e4c888557611a4db38b66a01dd68 /source3/param
parent60078160dec6b6c8b1b87229fa66d617f340aeca (diff)
downloadsamba-595145337ecd53441c1129d037be73c0f35fcb11.tar.gz
samba-595145337ecd53441c1129d037be73c0f35fcb11.tar.bz2
samba-595145337ecd53441c1129d037be73c0f35fcb11.zip
fix log level, set a default, and also copy the value set in smb.conf into parm_struct.ptr
this one also fixes log level not shown in swat fix swat help system (This used to be commit 7532e828966f3baaa418b528a5b7fe450c488401)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index d649b421c9..0142d6c32d 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -166,6 +166,7 @@ typedef struct
char *szGuestaccount;
char *szManglingMethod;
int max_log_size;
+ char *szLogLevel;
int mangled_stack;
int max_xmit;
int max_mux;
@@ -767,8 +768,8 @@ static struct parm_struct parm_table[] = {
{"Logging Options", P_SEP, P_SEPARATOR},
{"admin log", P_BOOL, P_GLOBAL, &Globals.bAdminLog, NULL, NULL, 0},
- {"log level", P_STRING, P_GLOBAL, NULL, handle_debug_list, NULL, 0},
- {"debuglevel", P_STRING, P_GLOBAL, NULL, handle_debug_list, NULL, 0},
+ {"log level", P_STRING, P_GLOBAL, &Globals.szLogLevel, handle_debug_list, NULL, 0},
+ {"debuglevel", P_STRING, P_GLOBAL, &Globals.szLogLevel, handle_debug_list, NULL, 0},
{"syslog", P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0},
{"syslog only", P_BOOL, P_GLOBAL, &Globals.bSyslogOnly, NULL, NULL, 0},
{"log file", P_STRING, P_GLOBAL, &Globals.szLogFile, NULL, NULL, 0},
@@ -1277,6 +1278,7 @@ static void init_globals(void)
Globals.bSyslogOnly = False;
Globals.bAdminLog = False;
Globals.bTimestampLogs = True;
+ string_set(&Globals.szLogLevel, "0");
Globals.bDebugHiresTimestamp = False;
Globals.bDebugPid = False;
Globals.bDebugUid = False;
@@ -2642,6 +2644,7 @@ static BOOL handle_debug_list( char *pszParmValueIn, char **ptr )
pstring pszParmValue;
pstrcpy(pszParmValue, pszParmValueIn);
+ string_set(ptr, pszParmValueIn);
return debug_parse_levels( pszParmValue );
}