加了登录密码和动态修改日志输出等级功能
This commit is contained in:
parent
d8b3e2f563
commit
4db020575a
|
@ -58,6 +58,7 @@
|
||||||
"ctype.h": "c",
|
"ctype.h": "c",
|
||||||
"string.h": "c",
|
"string.h": "c",
|
||||||
"completion.h": "c",
|
"completion.h": "c",
|
||||||
"bsp_vin_detection.h": "c"
|
"bsp_vin_detection.h": "c",
|
||||||
|
"ulog_def.h": "c"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include "rtdef.h"
|
#include "rtdef.h"
|
||||||
#include "bsp_flash.h"
|
#include "bsp_flash.h"
|
||||||
|
|
||||||
#define SYS_PREHEAT_TIME_S (10U)
|
|
||||||
#define SYS_MUTE_TIME_S (uint8_t)(10 * 3)
|
|
||||||
|
|
||||||
#define MAX_EXPIRATION_DAYS (uint16_t)(365 * 10 + 30 * 3)
|
#define MAX_EXPIRATION_DAYS (uint16_t)(365 * 10 + 30 * 3)
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ int finsh_set_prompt(const char *prompt);
|
||||||
#define FINSH_PASSWORD_MIN 6
|
#define FINSH_PASSWORD_MIN 6
|
||||||
#endif
|
#endif
|
||||||
#ifndef FINSH_DEFAULT_PASSWORD
|
#ifndef FINSH_DEFAULT_PASSWORD
|
||||||
#define FINSH_DEFAULT_PASSWORD "rtthread"
|
#define FINSH_DEFAULT_PASSWORD "yd4n02a"
|
||||||
#endif
|
#endif
|
||||||
#endif /* FINSH_USING_AUTH */
|
#endif /* FINSH_USING_AUTH */
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "ulog.h"
|
#include "ulog.h"
|
||||||
#include "rthw.h"
|
#include "rthw.h"
|
||||||
|
#include "stdlib.h"
|
||||||
|
|
||||||
#ifdef ULOG_USING_SYSLOG
|
#ifdef ULOG_USING_SYSLOG
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
@ -1519,6 +1520,7 @@ int ulog_init(void)
|
||||||
|
|
||||||
#ifdef ULOG_USING_FILTER
|
#ifdef ULOG_USING_FILTER
|
||||||
ulog_global_filter_lvl_set(LOG_FILTER_LVL_ALL);
|
ulog_global_filter_lvl_set(LOG_FILTER_LVL_ALL);
|
||||||
|
// ulog_global_filter_lvl_set(LOG_FILTER_LVL_SILENT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ulog.init_ok = RT_TRUE;
|
ulog.init_ok = RT_TRUE;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ulog init and deint
|
* ulog init and deint
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
|
|
||||||
/* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */
|
/* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */
|
||||||
|
|
||||||
|
#define FINSH_USING_AUTH //开启终端密码登录功能
|
||||||
|
#define ULOG_USING_FILTER //开启动态修改日志等级 默认修改在ulog.c 1522行
|
||||||
|
|
||||||
#define ENABLE_LOG_ALL
|
#define ENABLE_LOG_ALL
|
||||||
#define TEST_ENABLE //打开所有的终端测试程序
|
#define TEST_ENABLE //打开所有的终端测试程序
|
||||||
#define ULOG_OUTPUT_LVL 7 // 生产时将其设为0
|
#define ULOG_OUTPUT_LVL 7 // 生产时将其设为0
|
||||||
|
|
Loading…
Reference in New Issue