提交 f64a00c0 编写于 作者: Y YuQing

add function log_try_init

上级 350f9237
......@@ -115,6 +115,19 @@ extern LogContext g_log_context;
*/
int log_init();
/** init function using global log context
* do nothing when already inited
* return: 0 for success, != 0 fail
*/
static int log_try_init()
{
if (g_log_context.log_buff != NULL)
{
return 0;
}
return log_init();
}
/** init function using global log context, take over stderr and stdout
* return: 0 for success, != 0 fail
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册