Skip to content

Commit

Permalink
Review fixes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosko committed Jun 14, 2021
1 parent 06366c4 commit d716883
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions shell/platform/tizen/tizen_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ static int stderr_pipe[2];
static pthread_t stdout_thread;
static pthread_t stderr_thread;
static bool is_running = false;
static log_priority min_priority_level = DLOG_ERROR;
static log_priority min_log_priority = DLOG_ERROR;

void SetMinLoggingLevel(log_priority p) {
min_priority_level = p;
min_log_priority = p;
};

log_priority GetMinLoggingLevel() {
return min_priority_level;
return min_log_priority;
};

static void* LoggingFunction(void* arg) {
Expand Down
11 changes: 7 additions & 4 deletions shell/platform/tizen/tizen_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ log_priority GetMinLoggingLevel();
#define __LOG(prio, fmt, args...) dlog_print(prio, LOG_TAG, fmt, ##args)
#endif

#define __FT_LOG(prio, fmt, args...) \
if (prio >= GetMinLoggingLevel()) { \
__LOG(prio, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##args); \
}
#define __FT_LOG(prio, fmt, args...) \
do { \
if (prio >= GetMinLoggingLevel()) { \
__LOG(prio, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, \
##args); \
} \
} while (0)

#define FT_LOGD(fmt, args...) __FT_LOG(DLOG_DEBUG, fmt, ##args)
#define FT_LOGI(fmt, args...) __FT_LOG(DLOG_INFO, fmt, ##args)
Expand Down

0 comments on commit d716883

Please sign in to comment.