From: jk7744.park Date: Sat, 24 Oct 2015 08:03:29 +0000 (+0900) Subject: tizen 2.4 release X-Git-Tag: accepted/tizen/2.4/mobile/20151029.031936^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0521bbfeade0ec611aa4101cbfa1c242c51dc420;p=framework%2Fsystem%2Fdlog.git tizen 2.4 release --- 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 [