From 0521bbfeade0ec611aa4101cbfa1c242c51dc420 Mon Sep 17 00:00:00 2001 From: "jk7744.park" Date: Sat, 24 Oct 2015 17:03:29 +0900 Subject: [PATCH] tizen 2.4 release --- Makefile.am | 6 +- doc/dlog_doc.h | 95 +++++ include/dlog-internal.h | 444 +++++++++++++++++++++ include/dlog.h | 408 +------------------ include/logprint.h | 1 + packaging/dlog.spec | 11 +- ...nf-micro-debug.in => dlog_logger.conf-debug.in} | 2 +- packaging/dlog_logger.conf.in | 6 +- packaging/dlog_logger.service | 4 + packaging/dlogutil.manifest | 5 + src/libdlog/log.c | 3 + src/libdlog/loglimiter.c | 1 + src/logger/logger.c | 2 +- src/logutil/logutil.c | 5 +- src/shared/logprint.c | 10 +- 15 files changed, 582 insertions(+), 421 deletions(-) create mode 100755 include/dlog-internal.h rename packaging/{dlog_logger.conf-micro-debug.in => dlog_logger.conf-debug.in} (68%) diff --git a/Makefile.am b/Makefile.am index b0d79d5..3d3097d 100755 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +AUTOMAKE_OPTIONS = subdir-objects + AM_CFLAGS = -I$(srcdir)/include \ $(DEBUG_CFLAGS) \ -Werror \ @@ -5,13 +7,15 @@ AM_CFLAGS = -I$(srcdir)/include \ dlog_includedir = $(includedir)/dlog dlog_include_HEADERS = \ - include/dlog.h + include/dlog.h \ + include/dlog-internal.h lib_LTLIBRARIES = libdlog.la libdlog_la_SOURCES = \ src/libdlog/log.c \ include/dlog.h \ + include/dlog-internal.h \ src/libdlog/logconfig.c \ include/logconfig.h \ src/libdlog/loglimiter.c \ diff --git a/doc/dlog_doc.h b/doc/dlog_doc.h index 1d825b1..179b8a2 100755 --- a/doc/dlog_doc.h +++ b/doc/dlog_doc.h @@ -52,6 +52,101 @@ priority level indicates the urgency of log message Error message - Indicate error. + +

Marco example for useful usage

+The dlog APIs can be used by defining own macros. The macros can be defined like below examples. +Thus, developers can use appropriate method as a matter of convenience. + +@code +#undef LOG_TAG +#define LOG_TAG "APP_TAG" + +#define LOGI(fmt, arg...) \ + ({ do { \ + dlog_print(DLOG_INFO, LOG_TAG, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg); \ + } while (0); }) +#define LOGW(fmt, arg...) \ + ({ do { \ + dlog_print(DLOG_WARN, LOG_TAG, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg); \ + } while (0); }) +#define LOGE(fmt, arg...) \ + ({ do { \ + dlog_print(DLOG_ERROR, LOG_TAG, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg); \ + } while (0); }) +@endcode + +

dlogutil

+

Introduction

+You can use dlogutil command to view and follow the contents of the log buffers. The general usage is : +@code +dlogutil [