aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Lin <simonlin@google.com>2022-05-10 12:20:42 +0800
committerGitHub <noreply@github.com>2022-05-09 21:20:42 -0700
commit5d7c91c5f04a614f5ae3814a881c60d106de73d8 (patch)
tree99b344ea1770daa33d4d02fb8d5e11c1386a6652 /src
parent5450ed15e53792d5e1ba6d9a774c5efa14ee6e2c (diff)
downloadot-br-posix-5d7c91c5f04a614f5ae3814a881c60d106de73d8.tar.gz
[agent] refine booting logs (#1365)
Use `NOTE` log level instead of `INFO` since the log information is important.
Diffstat (limited to 'src')
-rw-r--r--src/agent/main.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/agent/main.cpp b/src/agent/main.cpp
index c211abdd..b90d5fa4 100644
--- a/src/agent/main.cpp
+++ b/src/agent/main.cpp
@@ -26,6 +26,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#define OTBR_LOG_TAG "AGENT"
+
#include <openthread-br/config.h>
#include <fstream>
@@ -117,19 +119,17 @@ static otbrLogLevel GetDefaultLogLevel(void)
return level;
}
-static void PrintRadioVersion(otInstance *aInstance)
-{
- printf("%s\n", otPlatRadioGetVersionString(aInstance));
-}
-
static void PrintRadioVersionAndExit(const std::vector<const char *> &aRadioUrls)
{
otbr::Ncp::ControllerOpenThread ncpOpenThread{/* aInterfaceName */ "", aRadioUrls, /* aBackboneInterfaceName */ "",
/* aDryRun */ true};
+ const char * radioVersion;
ncpOpenThread.Init();
- PrintRadioVersion(ncpOpenThread.GetInstance());
+ radioVersion = otPlatRadioGetVersionString(ncpOpenThread.GetInstance());
+ otbrLogNotice("Radio version: %s", radioVersion);
+ printf("%s\n", radioVersion);
ncpOpenThread.Deinit();
@@ -192,14 +192,14 @@ static int realmain(int argc, char *argv[])
}
otbrLogInit(kSyslogIdent, logLevel, verbose);
- otbrLogInfo("Running %s", OTBR_PACKAGE_VERSION);
- otbrLogInfo("Thread version: %s", otbr::Ncp::ControllerOpenThread::GetThreadVersion());
- otbrLogInfo("Thread interface: %s", interfaceName);
- otbrLogInfo("Backbone interface: %s", backboneInterfaceName);
+ otbrLogNotice("Running %s", OTBR_PACKAGE_VERSION);
+ otbrLogNotice("Thread version: %s", otbr::Ncp::ControllerOpenThread::GetThreadVersion());
+ otbrLogNotice("Thread interface: %s", interfaceName);
+ otbrLogNotice("Backbone interface: %s", backboneInterfaceName);
for (int i = optind; i < argc; i++)
{
- otbrLogInfo("Radio URL: %s", argv[i]);
+ otbrLogNotice("Radio URL: %s", argv[i]);
radioUrls.push_back(argv[i]);
}