projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0497768
)
Add debug_level_is_enabled()
author
Fabian Keil
<fk@fabiankeil.de>
Fri, 27 Jul 2012 17:27:47 +0000
(17:27 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Fri, 27 Jul 2012 17:27:47 +0000
(17:27 +0000)
errlog.c
patch
|
blob
|
history
errlog.h
patch
|
blob
|
history
diff --git
a/errlog.c
b/errlog.c
index
6e31e68
..
e094ddd
100644
(file)
--- a/
errlog.c
+++ b/
errlog.c
@@
-1,4
+1,4
@@
-const char errlog_rcs[] = "$Id: errlog.c,v 1.11
3 2012/03/09 16:23
:50 fabiankeil Exp $";
+const char errlog_rcs[] = "$Id: errlog.c,v 1.11
4 2012/03/09 17:55
:50 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.c,v $
@@
-244,6
+244,23
@@
void set_debug_level(int debug_level)
}
}
+/*********************************************************************
+ *
+ * Function : debug_level_is_enabled
+ *
+ * Description : Checks if a certain debug level is enabled.
+ *
+ * Parameters : 1: debug_level = The debug level to check.
+ *
+ * Returns : Nothing.
+ *
+ *********************************************************************/
+int debug_level_is_enabled(int debug_level)
+{
+ return (0 != (debug & debug_level));
+}
+
+
/*********************************************************************
*
* Function : disable_logging
/*********************************************************************
*
* Function : disable_logging
diff --git
a/errlog.h
b/errlog.h
index
8fac4e6
..
6934137
100644
(file)
--- a/
errlog.h
+++ b/
errlog.h
@@
-1,6
+1,6
@@
#ifndef ERRLOG_H_INCLUDED
#define ERRLOG_H_INCLUDED
#ifndef ERRLOG_H_INCLUDED
#define ERRLOG_H_INCLUDED
-#define ERRLOG_H_VERSION "$Id: errlog.h,v 1.2
6 2010/07/26 11:30:09
fabiankeil Exp $"
+#define ERRLOG_H_VERSION "$Id: errlog.h,v 1.2
7 2011/09/04 11:10:56
fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.h,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.h,v $
@@
-66,6
+66,7
@@
extern "C" {
extern void init_error_log(const char *prog_name, const char *logfname);
extern void set_debug_level(int debuglevel);
extern void init_error_log(const char *prog_name, const char *logfname);
extern void set_debug_level(int debuglevel);
+extern int debug_level_is_enabled(int debuglevel);
extern void disable_logging(void);
extern void init_log_module(void);
extern void show_version(const char *prog_name);
extern void disable_logging(void);
extern void init_log_module(void);
extern void show_version(const char *prog_name);