[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Wed Nov 16 04:26:04 MST 2011
The branch, master has been updated
via ffb846b lib/util/debug: with log level = 10 we should be more verbose
from 8507adb provision: Set the security descriptor while creating partitions
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ffb846ba7c8fcec29236453b70988febc5dd77ad
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Nov 15 21:50:54 2011 +0100
lib/util/debug: with log level = 10 we should be more verbose
log level = 10 already impacts performance, so we can turn on
more details and print the pid, [e][u|g]id and class information.
So it implies "debug pid = yes", "debug uid = yes" and "debug class = yes".
This generates a lot more useful log files.
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Wed Nov 16 12:25:02 CET 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
lib/util/debug.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/debug.c b/lib/util/debug.c
index cc57ba8..a638851 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -944,14 +944,19 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
* not yet loaded, then default to timestamps on.
*/
if( state.settings.timestamp_logs || state.settings.debug_prefix_timestamp) {
+ bool verbose = false;
char header_str[200];
header_str[0] = '\0';
- if( state.settings.debug_pid)
+ if (unlikely(DEBUGLEVEL_CLASS[ cls ] >= 10)) {
+ verbose = true;
+ }
+
+ if (verbose || state.settings.debug_pid)
slprintf(header_str,sizeof(header_str)-1,", pid=%u",(unsigned int)getpid());
- if( state.settings.debug_uid) {
+ if (verbose || state.settings.debug_uid) {
size_t hs_len = strlen(header_str);
slprintf(header_str + hs_len,
sizeof(header_str) - 1 - hs_len,
@@ -960,7 +965,8 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
(unsigned int)getuid(), (unsigned int)getgid());
}
- if (state.settings.debug_class && (cls != DBGC_ALL)) {
+ if ((verbose || state.settings.debug_class)
+ && (cls != DBGC_ALL)) {
size_t hs_len = strlen(header_str);
slprintf(header_str + hs_len,
sizeof(header_str) -1 - hs_len,
--
Samba Shared Repository
More information about the samba-cvs
mailing list