From 5927f69c2a218bdea0a888248e6a1164ae7f0901 Mon Sep 17 00:00:00 2001 From: armink Date: Thu, 9 Feb 2017 11:21:34 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E3=80=90=E6=9B=B4=E6=96=B0=E3=80=91L?= =?UTF-8?q?og=20demo=20=E4=BD=BF=E5=85=B6=E9=80=82=E9=85=8D=20EasyLogger?= =?UTF-8?q?=20=E6=9C=80=E6=96=B0=E6=BA=90=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: armink --- demo/log/easylogger.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/demo/log/easylogger.c b/demo/log/easylogger.c index 3ae7033..ce9f7d8 100644 --- a/demo/log/easylogger.c +++ b/demo/log/easylogger.c @@ -1,7 +1,7 @@ /* * This file is part of the EasyFlash Library. * - * Copyright (c) 2015, Armink, + * Copyright (c) 2015-2017, Armink, * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -26,14 +26,9 @@ * Created on: 2015-07-06 */ -#include "elog_flash.h" +#define LOG_TAG "main" -#define log_a(...) elog_a("main.test.a", __VA_ARGS__) -#define log_e(...) elog_e("main.test.e", __VA_ARGS__) -#define log_w(...) elog_w("main.test.w", __VA_ARGS__) -#define log_i(...) elog_i("main.test.i", __VA_ARGS__) -#define log_d(...) elog_d("main.test.d", __VA_ARGS__) -#define log_v(...) elog_v("main.test.v", __VA_ARGS__) +#include "elog_flash.h" static void test_elog(void); static void elog_user_assert_hook(const char* ex, const char* func, size_t line); @@ -83,6 +78,7 @@ static void test_elog(void) { } static void elog_user_assert_hook(const char* ex, const char* func, size_t line) { + rt_enter_critical(); /* disable logger output lock */ elog_output_lock_enabled(false); /* disable flash plugin lock */