6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 #ifndef _RDSIB_DEBUG_H
27 #define _RDSIB_DEBUG_H
28
29 #pragma ident "%Z%%M% %I% %E% SMI"
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #define LABEL "RDS"
36
37 /*
38 * warnings, console & syslog buffer.
39 * For Non recoverable or Major Errors
40 */
41 #define RDS_LOG_L0 0
42
43 /*
44 * syslog buffer or RDS trace buffer (console if booted /w debug)
45 * For additional information on Non recoverable errors and
46 * warnings/informational message for sys-admin types.
47 */
48 #define RDS_LOG_L1 1
49
50 /*
82
83 #ifdef DEBUG
84 #define RDS_DPRINTF_INTR rds_dprintf_intr
85 #define RDS_DPRINTF5 rds_dprintf5
86 #define RDS_DPRINTF4 rds_dprintf4
87 #define RDS_DPRINTF3 rds_dprintf3
88
89 void rds_dprintf_intr(
90 char *name,
91 char *fmt, ...);
92 void rds_dprintf5(
93 char *name,
94 char *fmt, ...);
95 void rds_dprintf4(
96 char *name,
97 char *fmt, ...);
98 void rds_dprintf3(
99 char *name,
100 char *fmt, ...);
101 #else
102 #define RDS_DPRINTF_INTR 0 &&
103 #define RDS_DPRINTF5 0 &&
104 #define RDS_DPRINTF4 0 &&
105 #define RDS_DPRINTF3 0 &&
106 #endif
107
108 #define RDS_DPRINTF2 rds_dprintf2
109 #define RDS_DPRINTF1 rds_dprintf1
110 #define RDS_DPRINTF0 rds_dprintf0
111
112 void rds_dprintf2(
113 char *name,
114 char *fmt, ...);
115 void rds_dprintf1(
116 char *name,
117 char *fmt, ...);
118 void rds_dprintf0(
119 char *name,
120 char *fmt, ...);
121
122 #ifdef __cplusplus
123 }
124 #endif
125
|
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 /*
27 * Copyright 2019, Joyent, Inc.
28 */
29
30 #ifndef _RDSIB_DEBUG_H
31 #define _RDSIB_DEBUG_H
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #define LABEL "RDS"
38
39 /*
40 * warnings, console & syslog buffer.
41 * For Non recoverable or Major Errors
42 */
43 #define RDS_LOG_L0 0
44
45 /*
46 * syslog buffer or RDS trace buffer (console if booted /w debug)
47 * For additional information on Non recoverable errors and
48 * warnings/informational message for sys-admin types.
49 */
50 #define RDS_LOG_L1 1
51
52 /*
84
85 #ifdef DEBUG
86 #define RDS_DPRINTF_INTR rds_dprintf_intr
87 #define RDS_DPRINTF5 rds_dprintf5
88 #define RDS_DPRINTF4 rds_dprintf4
89 #define RDS_DPRINTF3 rds_dprintf3
90
91 void rds_dprintf_intr(
92 char *name,
93 char *fmt, ...);
94 void rds_dprintf5(
95 char *name,
96 char *fmt, ...);
97 void rds_dprintf4(
98 char *name,
99 char *fmt, ...);
100 void rds_dprintf3(
101 char *name,
102 char *fmt, ...);
103 #else
104 #define RDS_DPRINTF_INTR(...)
105 #define RDS_DPRINTF5(...)
106 #define RDS_DPRINTF4(...)
107 #define RDS_DPRINTF3(...)
108 #endif
109
110 #define RDS_DPRINTF2 rds_dprintf2
111 #define RDS_DPRINTF1 rds_dprintf1
112 #define RDS_DPRINTF0 rds_dprintf0
113
114 void rds_dprintf2(
115 char *name,
116 char *fmt, ...);
117 void rds_dprintf1(
118 char *name,
119 char *fmt, ...);
120 void rds_dprintf0(
121 char *name,
122 char *fmt, ...);
123
124 #ifdef __cplusplus
125 }
126 #endif
127
|