diff --git a/osal/linux/os_log.cpp b/osal/linux/os_log.cpp index 3688d54c..877e6aea 100644 --- a/osal/linux/os_log.cpp +++ b/osal/linux/os_log.cpp @@ -39,13 +39,18 @@ static SyslogWrapper syslog_wrapper; SyslogWrapper::SyslogWrapper() { - int option = LOG_PID | LOG_CONS; - RK_U32 syslog_perror = 0; + int option = LOG_PID; + RK_U32 syslog_perror = 1; + RK_U32 syslog_cons = 0; - os_get_env_u32("mpp_syslog_perror", &syslog_perror, 0); + os_get_env_u32("mpp_syslog_perror", &syslog_perror, 1); if (syslog_perror) option |= LOG_PERROR; + os_get_env_u32("mpp_syslog_cons", &syslog_cons, 0); + if (syslog_cons) + option |= LOG_CONS; + openlog("mpp", option, LOG_USER); }