dlog
Logging framework
dlog.h
Go to the documentation of this file.
1/* MIT License
2 *
3 * Copyright (c) 2012-2020 Samsung Electronics Co., Ltd
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is furnished
10 * to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 * THE SOFTWARE. */
22
23
31#ifndef _DLOG_H_
32#define _DLOG_H_
33
34#include <stdarg.h>
35#include <string.h>
36#include <tizen_error.h>
37/*
38 * This is for checking dlog_print format string.
39 */
40#pragma GCC diagnostic warning "-Wformat"
41#include "dlog-internal.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif /* __cplusplus */
46
47
48/*
49 * This is the local tag used for the following simplified
50 * logging macros. You can change this preprocessor definition
51 * before using the other macros to change the tag.
52 */
53#ifndef LOG_TAG
54#define LOG_TAG NULL
55#endif
56
57
69typedef enum {
70 DLOG_ERROR_NONE = TIZEN_ERROR_NONE,
71 DLOG_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,
72 DLOG_ERROR_NOT_PERMITTED = TIZEN_ERROR_NOT_PERMITTED
74
75
91typedef enum {
103
104
144int dlog_print(log_priority prio, const char *tag, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
145
146
182int dlog_vprint(log_priority prio, const char *tag, const char *fmt, va_list ap);
183
184
190#ifdef __cplusplus
191}
192#endif /* __cplusplus */
193#endif /* _DLOG_H_*/
dlog_error_e
Enumeration for Dlog Error. .
Definition: dlog.h:69
log_priority
Enumeration for log priority values in ascending priority order. .
Definition: dlog.h:91
int int dlog_vprint(log_priority prio, const char *tag, const char *fmt, va_list ap)
Sends log with priority, tag, and va_list.
int dlog_print(log_priority prio, const char *tag, const char *fmt,...) __attribute__((format(printf
Sends log with priority and tag.
@ DLOG_ERROR_NONE
Definition: dlog.h:70
@ DLOG_ERROR_NOT_PERMITTED
Definition: dlog.h:72
@ DLOG_ERROR_INVALID_PARAMETER
Definition: dlog.h:71
@ DLOG_UNKNOWN
Definition: dlog.h:92
@ DLOG_FATAL
Definition: dlog.h:99
@ DLOG_ERROR
Definition: dlog.h:98
@ DLOG_VERBOSE
Definition: dlog.h:94
@ DLOG_WARN
Definition: dlog.h:97
@ DLOG_SILENT
Definition: dlog.h:100
@ DLOG_INFO
Definition: dlog.h:96
@ DLOG_DEFAULT
Definition: dlog.h:93
@ DLOG_PRIO_MAX
Definition: dlog.h:101
@ DLOG_DEBUG
Definition: dlog.h:95