From: Chanwoo Choi Date: Sun, 5 Feb 2017 23:47:13 +0000 (+0900) Subject: shared: Unify the separate log.h to remove the duplicate header file X-Git-Tag: accepted/tizen/mobile/20170328.053617~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F113043%2F4;p=platform%2Fcore%2Fsystem%2Fpass.git shared: Unify the separate log.h to remove the duplicate header file This patch unifies the separate log.h header file and remove the duplicate the log header file. Change-Id: Id61e07a7a244070e1c139ce007c8a8118137321a Signed-off-by: Chanwoo Choi --- diff --git a/src/shared/log-macro.h b/src/shared/log-macro.h deleted file mode 100644 index ab42821..0000000 --- a/src/shared/log-macro.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * PASS (Power Aware System Service) - * - * Copyright (c) 2017 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __LOG_MACRO_H__ -#define __LOG_MACRO_H__ - -#ifdef ENABLE_DLOG -#include -#define _D(fmt, arg...) \ - do { SLOGD(fmt, ##arg); } while(0) -#define _I(fmt, arg...) \ - do { SLOGI(fmt, ##arg); } while(0) -#define _W(fmt, arg...) \ - do { SLOGW(fmt, ##arg); } while(0) -#define _E(fmt, arg...) \ - do { SLOGE(fmt, ##arg); } while(0) -#define _SD(fmt, arg...) \ - do { SECURE_SLOGD(fmt, ##arg); } while(0) -#define _SI(fmt, arg...) \ - do { SECURE_SLOGI(fmt, ##arg); } while(0) -#define _SW(fmt, arg...) \ - do { SECURE_SLOGW(fmt, ##arg); } while(0) -#define _SE(fmt, arg...) \ - do { SECURE_SLOGE(fmt, ##arg); } while(0) -#else -#define _D(...) do { } while (0) -#define _I(...) do { } while (0) -#define _W(...) do { } while (0) -#define _E(...) do { } while (0) -#define _SD(...) do { } while (0) -#define _SI(...) do { } while (0) -#define _SW(...) do { } while (0) -#define _SE(...) do { } while (0) -#endif -#endif diff --git a/src/shared/log.h b/src/shared/log.h index 5850d15..636be78 100644 --- a/src/shared/log.h +++ b/src/shared/log.h @@ -16,15 +16,19 @@ * limitations under the License. */ - #ifndef __LOG_H__ #define __LOG_H__ -#ifdef ENABLE_LIBPASS_DLOG -#define ENABLE_DLOG -#endif - +#include #define LOG_TAG "PASS" -#include "shared/log-macro.h" + +#define _D(fmt, arg...) do { SLOGD(fmt, ##arg); } while(0) +#define _I(fmt, arg...) do { SLOGI(fmt, ##arg); } while(0) +#define _W(fmt, arg...) do { SLOGW(fmt, ##arg); } while(0) +#define _E(fmt, arg...) do { SLOGE(fmt, ##arg); } while(0) +#define _SD(fmt, arg...) do { SECURE_SLOGD(fmt, ##arg); } while(0) +#define _SI(fmt, arg...) do { SECURE_SLOGI(fmt, ##arg); } while(0) +#define _SW(fmt, arg...) do { SECURE_SLOGW(fmt, ##arg); } while(0) +#define _SE(fmt, arg...) do { SECURE_SLOGE(fmt, ##arg); } while(0) #endif