+++ /dev/null
-/*
- * firmware-update-system-ui
- *
- * 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 __FOTA_LOG_H__
-#define __FOTA_LOG_H__
-
-#include <stdio.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-
-#define LOG_TAG "FOTA_GUI_RW"
-
-#define COLOR_RED "\033[0;31m"
-#define COLOR_GREEN "\033[0;32m"
-#define COLOR_BROWN "\033[0;33m"
-#define COLOR_BLUE "\033[0;34m"
-#define COLOR_PURPLE "\033[0;35m"
-#define COLOR_CYAN "\033[0;36m"
-#define COLOR_LIGHTBLUE "\033[0;37m"
-#define COLOR_END "\033[0;m"
-
-#define _DEBUG_SECURE_LOG(fmt, args...) SECURE_SLOGD(fmt, ##args)
-#define _DEBUG_SECURE_EXCEPTION(fmt, args...) SECURE_SLOGE(COLOR_RED"* Critical * " fmt COLOR_END, ##args)
-
-#define _DEBUG_LOG(fmt, args...) SLOGI(fmt, ##args)
-#define _DEBUG_INFO(fmt, args...) SLOGI(COLOR_GREEN fmt COLOR_END, ##args)
-#define _DEBUG_WARNING(fmt, args...) SLOGW(COLOR_BLUE"* Warning * " fmt COLOR_END, ##args)
-#define _DEBUG_CHECK(fmt, args...) SLOGI(COLOR_LIGHTBLUE fmt, ##args)
-#define _DEBUG_EXCEPTION(fmt, args...) SLOGE(COLOR_RED"* Critical * " fmt COLOR_END, ##args)
-#define _FUNC_ENTER SLOGI(COLOR_GREEN"ENTER >>>>"COLOR_END)
-#define _FUNC_EXIT SLOGI(COLOR_GREEN"EXIT <<<<"COLOR_END)
-
-/*
- * DEBUGGING FEATURE
- */
-
-extern unsigned int __log_level__;
-extern FILE *__log_out_file__;
-
-#define LOG_INFO (1<<8)
-#define LOG_RWANI (1<<7)
-#define LOG_FUNCS (1<<6)
-#define LOG_GUI (1<<5)
-#define LOG_DEBUG (1<<4)
-#define LOG_FILE (1<<3)
-#define LOG_FLASH (1<<2)
-
-#define LOG_PRFIX "FOTA_GUI_RW"
-
-#define DEBUG_STDOUT
-//#define DEBUG_FILE
-
-#ifdef DEBUG_STDOUT
-#define LOGE(s, args...) printf(LOG_PRFIX "/ERROR(%s) " s, __func__, ##args) // Error log
-#define LOGL(mask, s, args...) do { if ((mask) & __log_level__) \
- printf(LOG_PRFIX "/(%s): " s, __func__, ##args); } while (0)
-#define LOG(s, args...) LOGL(LOG_DEBUG, s, ##args)
-
-#elif defined(DEBUG_FILE)
-#define LOGE(s, args...) fprintf(__log_out_file__, LOG_PRFIX "/ERROR(%s) " s, __func__, ##args)
-#define LOGL(mask, s, args...) do { if ((mask) & __log_level__) \
- fprintf(__log_out_file__, LOG_PRFIX "/(%s): " s , __func__, ##args); } while (0)
-#define LOG(s, args...) LOGL(LOG_DEBUG, s, ##args)
-
-#elif defined(DEBUG_STDOUT_FILE) // debug printf
-#define LOGE(s, args...) do {\
- printf(LOG_PRFIX "/ERROR(%s) " s, __func__, ##args);\
- fprintf(__log_out_file__, LOG_PRFIX "/ERROR(%s) " s, __func__, ##args);\
- } while (0)
-#define LOGL(mask, s, args...) do { \
- if ((mask) & __log_level__) {\
- printf(LOG_PRFIX "/(%s): " s , __func__, ##args);\
- fprintf(__log_out_file__, LOG_PRFIX "/(%s): " s, __func__, ##args);\
- } \
- } while (0)
-#define LOG(s, args...) LOGL(LOG_DEBUG, s, ##args)
-
-#else
-#define LOGE(s, args...)
-#define LOGL(mask, s, args...)
-#define LOG(s, args...)
-
-#endif
-
-
-#endif /* __FOTA_LOG_H__ */
-