summaryrefslogtreecommitdiff
path: root/web/src/alpined.d/debug.h
blob: 9a44ba814a303ddbf80c938dbb9a93f97ba0cba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*-----------------------------------------------------------------------
 $Id: debug.h 130 2006-09-22 04:39:36Z mikes@u.washington.edu $
  -----------------------------------------------------------------------*/

/* ========================================================================
 * Copyright 2006-2007 University of Washington
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * ========================================================================
 */

#ifndef _WEB_ALPINE_DEBUG_INCLUDED
#define _WEB_ALPINE_DEBUG_INCLUDED


#ifndef DEBUG
/*
 * support dprint regardless so we leave at least a few
 * footsteps in syslog
 */
#undef    dprint
#define   dprint(x)	{ output_debug_msg x ; }

/* alpined-scoped debugging level */
extern int debug;

void    output_debug_msg(int, char *fmt, ...);
#endif


/*
 * Use these to for dprint() debug level arg to force
 * debug output (typically to syslog())
 */
#define SYSDBG		0x8000
#define SYSDBG_ALERT	SYSDBG+1
#define SYSDBG_ERR	SYSDBG+2
#define SYSDBG_INFO	SYSDBG+3
#define SYSDBG_DEBUG	SYSDBG+4


/* exported prototypes */
void	debug_init(void);
void    setup_imap_debug(void);


#endif /* _WEB_ALPINE_DEBUG_INCLUDED */