diff --git a/.github/workflows/simulation-1.1.yml b/.github/workflows/simulation-1.1.yml index 5889015ec..02d96fb09 100644 --- a/.github/workflows/simulation-1.1.yml +++ b/.github/workflows/simulation-1.1.yml @@ -372,6 +372,7 @@ jobs: REFERENCE_DEVICE: 1 THREAD_VERSION: 1.1 VIRTUAL_TIME: 1 + CXXFLAGS: "-DOPENTHREAD_CONFIG_LOG_PREPEND_UPTIME=0" steps: - uses: actions/checkout@v2 with: diff --git a/examples/platforms/simulation/openthread-core-simulation-config.h b/examples/platforms/simulation/openthread-core-simulation-config.h index d9355bc37..f6f953b1e 100644 --- a/examples/platforms/simulation/openthread-core-simulation-config.h +++ b/examples/platforms/simulation/openthread-core-simulation-config.h @@ -212,4 +212,24 @@ #define OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH 1 #endif +/** + * @def OPENTHREAD_CONFIG_UPTIME_ENABLE + * + * Define to 1 to enable tracking the uptime of OpenThread instance. + * + */ +#ifndef OPENTHREAD_CONFIG_UPTIME_ENABLE +#define OPENTHREAD_CONFIG_UPTIME_ENABLE 1 +#endif + +/** + * @def OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME + * + * Define as 1 to prepend the current uptime to all log messages. + * + */ +#ifndef OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME +#define OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME 1 +#endif + #endif // OPENTHREAD_CORE_SIMULATION_CONFIG_H_ diff --git a/src/posix/platform/openthread-core-posix-config.h b/src/posix/platform/openthread-core-posix-config.h index d1ceb9208..a9754656e 100644 --- a/src/posix/platform/openthread-core-posix-config.h +++ b/src/posix/platform/openthread-core-posix-config.h @@ -267,4 +267,24 @@ #define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 640 #endif +/** + * @def OPENTHREAD_CONFIG_UPTIME_ENABLE + * + * Define to 1 to enable tracking the uptime of OpenThread instance. + * + */ +#ifndef OPENTHREAD_CONFIG_UPTIME_ENABLE +#define OPENTHREAD_CONFIG_UPTIME_ENABLE 1 +#endif + +/** + * @def OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME + * + * Define as 1 to prepend the current uptime to all log messages. + * + */ +#ifndef OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME +#define OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME 1 +#endif + #endif // OPENTHREAD_CORE_POSIX_CONFIG_H_