projects
/
onak.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix db4 backend - we weren't actually providing a suitable dbfuncs struct.
[onak.git]
/
log.h
diff --git
a/log.h
b/log.h
index 6cd16fcf277196bde3f376ccbd41648006a9a2f9..818f5f2d96ef61162080bfb79a028d25c3f640f8 100644
(file)
--- a/
log.h
+++ b/
log.h
@@
-4,13
+4,23
@@
* Jonathan McDowell <noodles@earth.li>
*
* Copyright 2003 Project Purple
* Jonathan McDowell <noodles@earth.li>
*
* Copyright 2003 Project Purple
- *
- * $Id: log.h,v 1.2 2003/06/04 20:57:10 noodles Exp $
*/
#ifndef __LOG_H__
#define __LOG_H__
*/
#ifndef __LOG_H__
#define __LOG_H__
+#include <assert.h>
+
+#define log_assert(expr) \
+ if (!(expr)) { \
+ logthing(LOGTHING_CRITICAL, \
+ "Assertion %s failed in %s, line %d", \
+ #expr, \
+ __FILE__, \
+ __LINE__); \
+ } \
+ assert(expr)
+
/*
* loglevels - levels of severity for a log entry
*
/*
* loglevels - levels of severity for a log entry
*