summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>1998-06-12 03:11:33 +0000
committerChristopher R. Hertel <crh@samba.org>1998-06-12 03:11:33 +0000
commit860f674c0deefca62f3c918cf657a902f4b73dd8 (patch)
treefd39cfccf772f5b257567f42ac1dd72ab5695dba /source3
parent9a735eb7e25d8bf6c5be7775d89436034ea6be8a (diff)
downloadsamba-860f674c0deefca62f3c918cf657a902f4b73dd8.tar.gz
samba-860f674c0deefca62f3c918cf657a902f4b73dd8.tar.bz2
samba-860f674c0deefca62f3c918cf657a902f4b73dd8.zip
This is the first, small step toward some tweaks that Jeremy and I have
been discussing regarding the debug mechanism. With this, I've added a macro that allows syntax like: if( DEBUGLVL( 3 ) ) { Debug1( "message" ); Debug2( "message" ); } The next step is to incorporate timestamps. Chris -)----- (This used to be commit 0b35065d0c5a33a9eebee683ecb08e9aef4c1830)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index dfbe213e57..085c06769b 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -100,10 +100,12 @@ typedef unsigned int uint32;
/* debugging code */
#ifndef SYSLOG
#define DEBUG(level,body) ((DEBUGLEVEL>=(level))?(Debug1 body):0)
+#define DEBUGLVL(level) (DEBUGLEVEL>=(level))
#else
extern int syslog_level;
#define DEBUG(level,body) ((DEBUGLEVEL>=(level))? (syslog_level = (level), Debug1 body):0)
+#define DEBUGLVL(level) ( DEBUGLEVEL >= (syslog_level=(level)) )
#endif
/* this defines the error codes that receive_smb can put in smb_read_error */