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