Skip to content

Commit

Permalink
fix(log): set default log level once
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Feb 24, 2020
1 parent 23d3fb8 commit 6fdcd73
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions framework/utils/frame_work_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@
#include <pthread.h>

#ifdef WIN32
#include <windows.h>
#include <windows.h>
#else

#include <sys/time.h>
#include <unistd.h>
#include <sys/time.h>
#include <unistd.h>

#endif

#ifdef __APPLE__

#include <TargetConditionals.h>
#include <string.h>
#include <TargetConditionals.h>
#include <string.h>

#endif

#ifdef ANDROID

#include <android/log.h>
#include <string.h>
#include <android/log.h>
#include <string.h>

#define ANDROID_APP_TAG "AliFrameWork"
#define ANDROID_APP_TAG "AliFrameWork"
#endif

#include "frame_work_log.h"

#undef printf

#ifndef VERSION
#define VERSION 0.9
#define VERSION 0.9
#endif

#define str(a) #a
Expand Down Expand Up @@ -277,7 +277,6 @@ static void initLog()
int __log_print(int prio, const char *tag, const char *fmt, ...)
{
pthread_once(&once, initLog);

if (prio > logCtrl.log_level) {
return 0;
}
Expand Down

0 comments on commit 6fdcd73

Please sign in to comment.