fdd544023c8442de1ee2f92afe77fefe90690000
[framework/system/dlog.git] / include / dlog.h
1 /*
2  * Copyright (C) 2005 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 /**
17  * @file        dlog.h
18  * @version     0.4
19  * @brief       This file is the header file of interface of dlog.
20  */
21 /**
22  * @addtogroup APPLICATION_FRAMEWORK
23  * @{
24  *
25  * @defgroup dlog dlog
26  * @addtogroup dlog
27  * @{
28
29  */
30 #ifndef _DLOG_H_
31 #define _DLOG_H_
32
33 #include<stdarg.h>
34 #include<string.h>
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif /* __cplusplus */
39
40 /*
41  * Normally we strip LOGV (VERBOSE messages) from release builds.
42  */
43 #ifndef LOG_NDEBUG
44 #ifdef NDEBUG
45 #define LOG_NDEBUG 1
46 #else
47 #define LOG_NDEBUG 0
48 #endif
49 #endif
50
51 /*
52  * This is the local tag used for the following simplified
53  * logging macros.  You can change this preprocessor definition
54  * before using the other macros to change the tag.
55  */
56 #ifndef LOG_TAG
57 #define LOG_TAG NULL
58 #endif
59
60 #define LOG_ON() _get_logging_on()
61
62 #ifndef __MODULE__
63 #define __MODULE__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
64 #endif
65 /*
66  * log priority values, in ascending priority order.
67  */
68 typedef enum {
69         DLOG_UNKNOWN = 0,
70         DLOG_DEFAULT,
71         DLOG_VERBOSE,
72         DLOG_DEBUG,
73         DLOG_INFO,
74         DLOG_WARN,
75         DLOG_ERROR,
76         DLOG_FATAL,
77         DLOG_SILENT,
78 } log_priority;
79
80 typedef enum {
81     LOG_ID_MAIN = 0,
82         LOG_ID_RADIO,
83         LOG_ID_SYSTEM,
84         LOG_ID_APPS,
85         LOG_ID_MAX
86 } log_id_t;
87
88 #define CONDITION(cond)     (__builtin_expect((cond) != 0, 0))
89
90 // ---------------------------------------------------------------------
91 /**
92  * Simplified macro to send a verbose log message using the current LOG_TAG.
93  */
94 #ifndef LOGV
95 #if LOG_NDEBUG
96 #define LOGV(...)   (0)
97 #else
98 #define LOGV(format, arg...) \
99         (LOG_ON() ? (LOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
100 #endif
101 #endif
102 /**
103  * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
104  */
105 #ifndef LOGV_IF
106 #if LOG_NDEBUG
107 #define LOGV_IF(cond, ...)   (0)
108 #else
109 #define LOGV_IF(cond, ...) \
110         (((CONDITION(cond)) && (LOG_ON())) ? \
111           (LOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
112 #endif
113 #endif
114 /**
115  * Simplified macro to send a debug log message using the current LOG_TAG.
116  */
117 #ifndef LOGD
118 #define LOGD(format, arg...) \
119         (LOG_ON() ? (LOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
120 #endif
121 /**
122  * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
123  */
124 #ifndef LOGD_IF
125 #define LOGD_IF(cond, ...) \
126         (((CONDITION(cond)) && (LOG_ON())) ? \
127           (LOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
128 #endif
129
130 /**
131  * Simplified macro to send an info log message using the current LOG_TAG.
132  */
133 #ifndef LOGI
134 #define LOGI(format, arg...) \
135         (LOG_ON() ? (LOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
136 #endif
137 /**
138  * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
139  */
140 #ifndef LOGI_IF
141 #define LOGI_IF(cond, ...) \
142         (((CONDITION(cond)) && (LOG_ON())) ? \
143           (LOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
144 #endif
145
146 /**
147  * Simplified macro to send a warning log message using the current LOG_TAG.
148  */
149 #ifndef LOGW
150 #define LOGW(format, arg...) \
151         (LOG_ON() ? (LOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
152 #endif
153 /**
154  * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
155  */
156 #ifndef LOGW_IF
157 #define LOGW_IF(cond, ...) \
158         (((CONDITION(cond)) && (LOG_ON())) ? \
159           (LOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
160 #endif
161
162 /**
163  * Simplified macro to send an error log message using the current LOG_TAG.
164  */
165 #ifndef LOGE
166 #define LOGE(format, arg...) \
167         (LOG_ON() ? (LOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
168 #endif
169 /**
170  * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
171  */
172 #ifndef LOGE_IF
173 #define LOGE_IF(cond, ...) \
174         (((CONDITION(cond)) && (LOG_ON())) ? \
175           (LOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
176 #endif
177 /**
178  * Simplified macro to send an error log message using the current LOG_TAG.
179  */
180 #ifndef LOGF
181 #define LOGF(format, arg...) \
182         (LOG_ON() ? (LOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
183 #endif
184 /**
185  * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
186  */
187 #ifndef LOGF_IF
188 #define LOGF_IF(cond, ...) \
189         (((CONDITION(cond)) && (LOG_ON())) ? \
190           (LOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
191 #endif
192
193 // ---------------------------------------------------------------------
194 /**
195  * Simplified radio macro to send a verbose log message using the current LOG_TAG.
196  */
197 #ifndef RLOGV
198 #if LOG_NDEBUG
199 #define RLOGV(...)   (0)
200 #else
201 #define RLOGV(format, arg...) \
202         (LOG_ON() ? (RLOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
203 #endif
204 #endif
205 /**
206  * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
207  */
208 #ifndef RLOGV_IF
209 #if LOG_NDEBUG
210 #define RLOGV_IF(cond, ...)   (0)
211 #else
212 #define RLOGV_IF(cond, ...) \
213         (((CONDITION(cond)) && (LOG_ON())) ? \
214           (RLOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
215 #endif
216 #endif
217
218 /**
219  * Simplified radio macro to send a debug log message using the current LOG_TAG.
220  */
221 #ifndef RLOGD
222 #define RLOGD(format, arg...) \
223         (LOG_ON() ? (RLOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
224 #endif
225 /**
226  * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
227  */
228 #ifndef RLOGD_IF
229 #define RLOGD_IF(cond, ...) \
230         (((CONDITION(cond)) && (LOG_ON())) ? \
231           (RLOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
232 #endif
233
234 /**
235  * Simplified radio macro to send an info log message using the current LOG_TAG.
236  */
237 #ifndef RLOGI
238 #define RLOGI(format, arg...) \
239         (LOG_ON() ? (RLOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
240 #endif
241 /**
242  * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
243  */
244 #ifndef RLOGI_IF
245 #define RLOGI_IF(cond, ...) \
246         (((CONDITION(cond)) && (LOG_ON())) ? \
247           (RLOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
248 #endif
249
250 /**
251  * Simplified radio macro to send a warning log message using the current LOG_TAG.
252  */
253 #ifndef RLOGW
254 #define RLOGW(format, arg...) \
255         (LOG_ON() ? (RLOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
256 #endif
257 /**
258  * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
259  */
260 #ifndef RLOGW_IF
261 #define RLOGW_IF(cond, ...) \
262         (((CONDITION(cond)) && (LOG_ON())) ? \
263           (RLOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
264 #endif
265
266 /**
267  * Simplified radio macro to send an error log message using the current LOG_TAG.
268  */
269 #ifndef RLOGE
270 #define RLOGE(format, arg...) \
271         (LOG_ON() ? (RLOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
272 #endif
273 /**
274  * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
275  */
276 #ifndef RLOGE_IF
277 #define RLOGE_IF(cond, ...) \
278         (((CONDITION(cond)) && (LOG_ON())) ? \
279           (RLOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
280 #endif
281 /**
282  * Simplified radio macro to send an error log message using the current LOG_TAG.
283  */
284 #ifndef RLOGF
285 #define RLOGF(format, arg...) \
286         (LOG_ON() ? (RLOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
287 #endif
288 /**
289  * Simplified radio macro to send a conditional verbose log message using the current LOG_TAG.
290  */
291 #ifndef RLOGF_IF
292 #define RLOGF_IF(cond, ...) \
293         (((CONDITION(cond)) && (LOG_ON())) ? \
294           (RLOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
295 #endif
296
297
298 // ---------------------------------------------------------------------
299 /**
300  * Simplified system macro to send a verbose log message using the current LOG_TAG.
301  */
302 #ifndef SLOGV
303 #if LOG_NDEBUG
304 #define SLOGV(...)   (0)
305 #else
306 #define SLOGV(format, arg...) \
307         (LOG_ON() ? (SLOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
308 #endif
309 #endif
310 /**
311  * Simplified macro to send a conditional verbose log message using the current LOG_TAG.
312  */
313 #ifndef SLOGV_IF
314 #if LOG_NDEBUG
315 #define SLOGV_IF(cond, ...)   (0)
316 #else
317 #define SLOGV_IF(cond, ...) \
318         (((CONDITION(cond)) && (LOG_ON())) ? \
319           (SLOG(LOG_VERBOSE, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
320 #endif
321 #endif
322
323 /**
324  * Simplified system macro to send a debug log message using the current LOG_TAG.
325  */
326 #ifndef SLOGD
327 #define SLOGD(format, arg...) \
328         (LOG_ON() ? (SLOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
329 #endif
330 /**
331  * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
332  */
333 #ifndef SLOGD_IF
334 #define SLOGD_IF(cond, ...) \
335         (((CONDITION(cond)) && (LOG_ON())) ? \
336           (SLOG(LOG_DEBUG, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
337 #endif
338
339 /**
340  * Simplified system macro to send an info log message using the current LOG_TAG.
341  */
342 #ifndef SLOGI
343 #define SLOGI(format, arg...) \
344         (LOG_ON() ? (SLOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
345 #endif
346 /**
347  * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
348  */
349 #ifndef SLOGI_IF
350 #define SLOGI_IF(cond, ...) \
351         (((CONDITION(cond)) && (LOG_ON())) ? \
352           (SLOG(LOG_INFO, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
353 #endif
354
355 /**
356  * Simplified system macro to send a warning log message using the current LOG_TAG.
357  */
358 #ifndef SLOGW
359 #define SLOGW(format, arg...) \
360         (LOG_ON() ? (SLOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
361 #endif
362 /**
363  * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
364  */
365 #ifndef SLOGW_IF
366 #define SLOGW_IF(cond, ...) \
367         (((CONDITION(cond)) && (LOG_ON())) ? \
368           (SLOG(LOG_WARN, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
369 #endif
370
371 /**
372  * Simplified system macro to send an error log message using the current LOG_TAG.
373  */
374 #ifndef SLOGE
375 #define SLOGE(format, arg...) \
376         (LOG_ON() ? (SLOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
377 #endif
378 /**
379  * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
380  */
381 #ifndef SLOGE_IF
382 #define SLOGE_IF(cond, ...) \
383         (((CONDITION(cond)) && (LOG_ON())) ? \
384           (SLOG(LOG_ERROR, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
385 #endif
386 /**
387  * Simplified system macro to send an error log message using the current LOG_TAG.
388  */
389 #ifndef SLOGF
390 #define SLOGF(format, arg...) \
391         (LOG_ON() ? (SLOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
392 #endif
393 /**
394  * Simplified system macro to send a conditional verbose log message using the current LOG_TAG.
395  */
396 #ifndef SLOGF_IF
397 #define SLOGF_IF(cond, ...) \
398         (((CONDITION(cond)) && (LOG_ON())) ? \
399           (SLOG(LOG_FATAL, LOG_TAG, "%s:%s(%d)>"format, __MODULE__, __func__, __LINE__, ##arg)) : (0))
400 #endif
401
402 // ---------------------------------------------------------------------
403
404 /**
405  * Simplified macro to send a verbose log message using the current LOG_TAG.
406  */
407 #ifndef ALOGV
408 #if LOG_NDEBUG
409 #define ALOGV(...)   (0)
410 #else
411 #define ALOGV(...) (ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
412 #endif
413 #endif
414 /**
415  * Simplified macro to send a debug log message using the current LOG_TAG.
416  */
417 #ifndef ALOGD
418 #define ALOGD(...) (ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__))
419 #endif
420 /**
421  * Simplified macro to send an info log message using the current LOG_TAG.
422  */
423 #ifndef ALOGI
424 #define ALOGI(...) (ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
425 #endif
426 /**
427  * Simplified macro to send a warning log message using the current LOG_TAG.
428  */
429 #ifndef ALOGW
430 #define ALOGW(...) (ALOG(LOG_WARN, LOG_TAG, __VA_ARGS__))
431 #endif
432 /**
433  * Simplified macro to send an error log message using the current LOG_TAG.
434  */
435 #ifndef ALOGE
436 #define ALOGE(...) (ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
437 #endif
438
439 // ---------------------------------------------------------------------
440 /**
441  * Basic log message macro that allows you to specify a priority and a tag
442  *
443  * Example:
444  *  LOG(DLOG_WARN, NULL, "Failed with error %d", errno);
445  *
446  * The second argument may be NULL or "" to indicate the "global" tag.
447  * 
448  * Future work : we want to put filename and line number automatically only when debug build mode 
449  */
450 #ifndef LOG
451 #define LOG(priority, tag, ...) \
452         print_log(D##priority, tag, __VA_ARGS__)
453 #endif
454
455 /**
456  * Log macro that allows you to pass in a varargs ("args" is a va_list).
457  */
458 #ifndef LOG_VA
459 #define LOG_VA(priority, tag, fmt, args) \
460     vprint_log(D##priority, tag, fmt, args)
461 #endif
462
463 #ifndef ALOG
464 #define ALOG(priority, tag, ...) \
465         print_apps_log(D##priority, tag, __VA_ARGS__)
466 #endif
467 /**
468  * Log macro that allows you to pass in a varargs ("args" is a va_list).
469  */
470 #ifndef ALOG_VA
471 #define ALOG_VA(priority, tag, fmt, args) \
472     vprint_apps_log(D##priority, tag, fmt, args)
473 #endif
474
475 /**
476  * Basic radio log macro that allows you to specify a priority and a tag.
477  */
478 #ifndef RLOG
479 #define RLOG(priority, tag, ...) \
480         print_radio_log(D##priority, tag, __VA_ARGS__)
481 #endif
482 /**
483  * Radio log macro that allows you to pass in a varargs ("args" is a va_list).
484  */
485 #ifndef RLOG_VA
486 #define RLOG_VA(priority, tag, fmt, args) \
487     vprint_radio_log(D##priority, tag, fmt, args)
488 #endif
489
490 /**
491  * Basic system log macro that allows you to specify a priority and a tag.
492  */
493 #ifndef SLOG
494 #define SLOG(priority, tag, ...) \
495     print_system_log(D##priority, tag, __VA_ARGS__)
496 #endif
497
498 /**
499  * System log macro that allows you to pass in a varargs ("args" is a va_list).
500  */
501 #ifndef SLOG_VA
502 #define SLOG_VA(priority, tag, fmt, args) \
503     vprint_system_log(D##priority, tag, fmt, args)
504 #endif
505
506
507 /*
508  * ===========================================================================
509  *
510  * The stuff in the rest of this file should not be used directly.
511  */
512
513 #define print_apps_log(prio, tag, fmt...) \
514         __dlog_print(LOG_ID_APPS, prio, tag, fmt)
515
516 #define vprint_apps_log(prio, tag, fmt...) \
517         __dlog_vprint(LOG_ID_APPS, prio, tag, fmt)
518
519 #define print_log(prio, tag, fmt...) \
520         __dlog_print(LOG_ID_MAIN, prio, tag, fmt)
521
522 #define vprint_log(prio, tag, fmt...) \
523         __dlog_vprint(LOG_ID_MAIN, prio, tag, fmt)
524
525 #define print_radio_log(prio, tag, fmt...)\
526         __dlog_print(LOG_ID_RADIO, prio, tag, fmt)
527
528 #define vprint_radio_log(prio, tag, fmt...) \
529         __dlog_vprint(LOG_ID_RADIO, prio, tag, fmt)
530
531 #define print_system_log(prio, tag, fmt...)\
532         __dlog_print(LOG_ID_SYSTEM, prio, tag, fmt)
533
534 #define vprint_system_log(prio, tag, fmt...) \
535         __dlog_vprint(LOG_ID_SYSTEM, prio, tag, fmt)
536
537 /**
538  * @brief               send log. must specify log_id ,priority, tag and format string.
539  * @pre         none
540  * @post                none
541  * @see         __dlog_print
542  * @remarks     you must not use this API directly. use macros instead.
543  * @param[in]   log_id  log device id
544  * @param[in]   prio    priority
545  * @param[in]   tag     tag
546  * @param[in]   fmt     format string 
547  * @return                      Operation result
548  * @retval              0>=     Success
549  * @retval              -1      Error
550  * @code
551 // you have to use LOG(), SLOG(), RLOG() family not to use __dlog_print() directly
552 // so below example is just for passing Documentation Verification !!!
553 #define LOG_TAG USR_TAG
554 #include<dlog.h>
555  __dlog_print(LOG_ID_MAIN, DLOG_INFO, USR_TAG, "you must not use this API directly");
556  * @endcode
557  */
558 int __dlog_print(log_id_t log_id, int prio, const char *tag, const char *fmt, ...);
559
560 /**
561  * @brief               send log with va_list. must specify log_id ,priority, tag and format string.
562  * @pre         none
563  * @post                none
564  * @see         __dlog_print
565  * @remarks     you must not use this API directly. use macros instead.
566  * @param[in]   log_id  log device id
567  * @param[in]   prio    priority
568  * @param[in]   tag     tag
569  * @param[in]   fmt     format string
570  * @param[in]   ap      va_list
571  * @return                      Operation result
572  * @retval              0>=     Success
573  * @retval              -1      Error
574  * @code
575  // you have to use LOG_VA(), SLOG_VA(), RLOG_VA() family not to use __dlog_print() directly
576  // so below example is just for passing Documentation Verification !!!
577 #define LOG_TAG USR_TAG
578 #include<dlog.h>
579   __dlog_vprint(LOG_ID_MAIN, DLOG_INFO, USR_TAG, "you must not use this API directly", ap);
580  * @endcode
581   */
582 int __dlog_vprint(log_id_t log_id, int prio, const char *tag, const char *fmt, va_list ap);
583 int _get_logging_on();
584
585 #ifdef __cplusplus
586 }
587 #endif /* __cplusplus */
588
589
590 /** @} */
591 /** @} */
592
593 #endif /* _DLOG_H_*/
594