mirror of
https://github.com/espressif/openthread.git
synced 2026-10-02 13:57:38 +00:00
[posix] log version on start (#4620)
This commit is contained in:
@@ -58,6 +58,7 @@
|
|||||||
#include <openthread/diag.h>
|
#include <openthread/diag.h>
|
||||||
#include <openthread/logging.h>
|
#include <openthread/logging.h>
|
||||||
#include <openthread/tasklet.h>
|
#include <openthread/tasklet.h>
|
||||||
|
#include <openthread/thread.h>
|
||||||
#include <openthread/platform/radio.h>
|
#include <openthread/platform/radio.h>
|
||||||
#if OPENTHREAD_POSIX_APP_TYPE == OPENTHREAD_POSIX_APP_TYPE_NCP
|
#if OPENTHREAD_POSIX_APP_TYPE == OPENTHREAD_POSIX_APP_TYPE_NCP
|
||||||
#include <openthread/ncp.h>
|
#include <openthread/ncp.h>
|
||||||
@@ -305,6 +306,8 @@ static otInstance *InitInstance(int aArgCount, char *aArgVector[])
|
|||||||
|
|
||||||
openlog(aArgVector[0], LOG_PID | (config.mIsVerbose ? LOG_PERROR : 0), LOG_DAEMON);
|
openlog(aArgVector[0], LOG_PID | (config.mIsVerbose ? LOG_PERROR : 0), LOG_DAEMON);
|
||||||
setlogmask(setlogmask(0) & LOG_UPTO(LOG_DEBUG));
|
setlogmask(setlogmask(0) & LOG_UPTO(LOG_DEBUG));
|
||||||
|
syslog(LOG_INFO, "Running %s", otGetVersionString());
|
||||||
|
syslog(LOG_INFO, "Thread version: %hu", otThreadGetVersion());
|
||||||
otLoggingSetLevel(config.mLogLevel);
|
otLoggingSetLevel(config.mLogLevel);
|
||||||
|
|
||||||
instance = otSysInit(&config.mPlatformConfig);
|
instance = otSysInit(&config.mPlatformConfig);
|
||||||
@@ -313,6 +316,10 @@ static otInstance *InitInstance(int aArgCount, char *aArgVector[])
|
|||||||
{
|
{
|
||||||
printf("%s\n", otPlatRadioGetVersionString(instance));
|
printf("%s\n", otPlatRadioGetVersionString(instance));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
syslog(LOG_INFO, "RCP version: %s", otPlatRadioGetVersionString(instance));
|
||||||
|
}
|
||||||
|
|
||||||
if (config.mIsDryRun)
|
if (config.mIsDryRun)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user