~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to contrib/ldapc++/src/debug.h

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2008-07-10 14:45:49 UTC
  • Revision ID: james.westby@ubuntu.com-20080710144549-wck73med0e72gfyo
Tags: upstream-2.4.10
ImportĀ upstreamĀ versionĀ 2.4.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/debug.h,v 1.5.10.1 2008/04/14 23:09:26 quanah Exp $
 
2
/*
 
3
 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
 
4
 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 
5
 */
 
6
 
 
7
#ifndef DEBUG_H
 
8
#define DEBUG_H
 
9
#include <iostream>
 
10
#include "config.h"
 
11
#define LDAP_DEBUG_NONE         0x0000
 
12
#define LDAP_DEBUG_TRACE        0x0001
 
13
#define LDAP_DEBUG_CONSTRUCT    0x0002
 
14
#define LDAP_DEBUG_DESTROY      0x0004
 
15
#define LDAP_DEBUG_PARAMETER    0x0008
 
16
#define LDAP_DEBUG_ANY          0xffff 
 
17
 
 
18
#define DEBUGLEVEL LDAP_DEBUG_ANY
 
19
 
 
20
#define PRINT_FILE      \
 
21
        std::cerr << "file: " __FILE__  << " line: " << __LINE__ 
 
22
 
 
23
#ifdef WITH_DEBUG
 
24
#define DEBUG(level, arg)       \
 
25
    if((level) & DEBUGLEVEL){     \
 
26
        std::cerr  << arg ;          \
 
27
    } 
 
28
#else
 
29
#undef DEBUG
 
30
#define DEBUG(level,arg)
 
31
#endif //WITH_DEBUG
 
32
 
 
33
#endif // DEBUG_H