@@ -229,15 +229,15 @@ CHIP_ERROR BaseApplication::StartAppTask(osThreadFunc_t taskFunction)
229
229
sAppEventQueue = osMessageQueueNew (APP_EVENT_QUEUE_SIZE, sizeof (AppEvent), &appEventQueueAttr);
230
230
if (sAppEventQueue == NULL )
231
231
{
232
- SILABS_LOG ( " Failed to allocate app event queue" );
232
+ ChipLogDetail (AppServer, " Failed to allocate app event queue" );
233
233
appError (APP_ERROR_EVENT_QUEUE_FAILED);
234
234
}
235
235
236
236
// Start App task.
237
237
sAppTaskHandle = osThreadNew (taskFunction, &sAppEventQueue , &appTaskAttr);
238
238
if (sAppTaskHandle == nullptr )
239
239
{
240
- SILABS_LOG ( " Failed to create app task" );
240
+ ChipLogDetail (AppServer, " Failed to create app task" );
241
241
appError (APP_ERROR_CREATE_TASK_FAILED);
242
242
}
243
243
return CHIP_NO_ERROR;
@@ -251,12 +251,12 @@ CHIP_ERROR BaseApplication::Init()
251
251
/*
252
252
* Wait for the WiFi to be initialized
253
253
*/
254
- SILABS_LOG ( " APP: Wait WiFi Init" );
254
+ ChipLogDetail (AppServer, " APP: Wait WiFi Init" );
255
255
while (!wfx_hw_ready ())
256
256
{
257
257
vTaskDelay (pdMS_TO_TICKS (10 ));
258
258
}
259
- SILABS_LOG ( " APP: Done WiFi Init" );
259
+ ChipLogDetail (AppServer, " APP: Done WiFi Init" );
260
260
/* We will init server when we get IP */
261
261
262
262
chip::DeviceLayer::PlatformMgr ().LockChipStack ();
@@ -273,7 +273,7 @@ CHIP_ERROR BaseApplication::Init()
273
273
);
274
274
if (sFunctionTimer == NULL )
275
275
{
276
- SILABS_LOG ( " funct timer create failed" );
276
+ ChipLogDetail (AppServer, " funct timer create failed" );
277
277
appError (APP_ERROR_CREATE_TIMER_FAILED);
278
278
}
279
279
@@ -285,12 +285,12 @@ CHIP_ERROR BaseApplication::Init()
285
285
);
286
286
if (sLightTimer == NULL )
287
287
{
288
- SILABS_LOG ( " Light Timer create failed" );
288
+ ChipLogDetail (AppServer, " Light Timer create failed" );
289
289
appError (APP_ERROR_CREATE_TIMER_FAILED);
290
290
}
291
291
292
- SILABS_LOG ( " Current Software Version String: %s" , CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING);
293
- SILABS_LOG ( " Current Software Version: %d" , CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
292
+ ChipLogDetail (AppServer, " Current Software Version String: %s" , CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING);
293
+ ChipLogDetail (AppServer, " Current Software Version: %d" , CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
294
294
295
295
ConfigurationMgr ().LogDeviceConfig ();
296
296
@@ -540,12 +540,12 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent)
540
540
chip::DeviceLayer::PlatformMgr ().UnlockChipStack ();
541
541
if (err != CHIP_NO_ERROR)
542
542
{
543
- SILABS_LOG ( " Failed to open the Basic Commissioning Window" );
543
+ ChipLogDetail (AppServer, " Failed to open the Basic Commissioning Window" );
544
544
}
545
545
}
546
546
else
547
547
{
548
- SILABS_LOG ( " Network is already provisioned, Ble advertisement not enabled" );
548
+ ChipLogDetail (AppServer, " Network is already provisioned, Ble advertisement not enabled" );
549
549
#if CHIP_CONFIG_ENABLE_ICD_SERVER
550
550
// Temporarily claim network activity, until we implement a "user trigger" reason for ICD wakeups.
551
551
PlatformMgr ().ScheduleWork ([](intptr_t ) { ICDNotifier::GetInstance ().NotifyNetworkActivityNotification (); });
@@ -568,7 +568,7 @@ void BaseApplication::CancelFunctionTimer()
568
568
{
569
569
if (osTimerStop (sFunctionTimer ) == osError)
570
570
{
571
- SILABS_LOG ( " app timer stop() failed" );
571
+ ChipLogDetail (AppServer, " app timer stop() failed" );
572
572
appError (APP_ERROR_STOP_TIMER_FAILED);
573
573
}
574
574
}
@@ -578,15 +578,15 @@ void BaseApplication::StartFunctionTimer(uint32_t aTimeoutInMs)
578
578
// Starts or restarts the function timer
579
579
if (osTimerStart (sFunctionTimer , pdMS_TO_TICKS (aTimeoutInMs)) != osOK)
580
580
{
581
- SILABS_LOG ( " app timer start() failed" );
581
+ ChipLogDetail (AppServer, " app timer start() failed" );
582
582
appError (APP_ERROR_START_TIMER_FAILED);
583
583
}
584
584
}
585
585
586
586
void BaseApplication::StartFactoryResetSequence ()
587
587
{
588
588
// Initiate the factory reset sequence
589
- SILABS_LOG ( " Factory Reset Triggered. Release button within %ums to cancel." , FACTORY_RESET_CANCEL_WINDOW_TIMEOUT);
589
+ ChipLogDetail (AppServer, " Factory Reset Triggered. Release button within %ums to cancel." , FACTORY_RESET_CANCEL_WINDOW_TIMEOUT);
590
590
591
591
// Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to
592
592
// cancel, if required.
@@ -615,15 +615,15 @@ void BaseApplication::CancelFactoryResetSequence()
615
615
if (sIsFactoryResetTriggered )
616
616
{
617
617
sIsFactoryResetTriggered = false ;
618
- SILABS_LOG ( " Factory Reset has been Canceled" );
618
+ ChipLogDetail (AppServer, " Factory Reset has been Canceled" );
619
619
}
620
620
}
621
621
622
622
void BaseApplication::StartStatusLEDTimer ()
623
623
{
624
624
if (osTimerStart (sLightTimer , kLightTimerPeriod ) != osOK)
625
625
{
626
- SILABS_LOG ( " Light Time start failed" );
626
+ ChipLogDetail (AppServer, " Light Time start failed" );
627
627
appError (APP_ERROR_START_TIMER_FAILED);
628
628
}
629
629
}
@@ -636,7 +636,7 @@ void BaseApplication::StopStatusLEDTimer()
636
636
637
637
if (osTimerStop (sLightTimer ) == osError)
638
638
{
639
- SILABS_LOG ( " Light Time start failed" );
639
+ ChipLogDetail (AppServer, " Light Time start failed" );
640
640
appError (APP_ERROR_STOP_TIMER_FAILED);
641
641
}
642
642
}
@@ -767,12 +767,12 @@ void BaseApplication::PostEvent(const AppEvent * aEvent)
767
767
{
768
768
if (osMessageQueuePut (sAppEventQueue , aEvent, osPriorityNormal, 0 ) != osOK)
769
769
{
770
- SILABS_LOG ( " Failed to post event to app task event queue" );
770
+ ChipLogDetail (AppServer, " Failed to post event to app task event queue" );
771
771
}
772
772
}
773
773
else
774
774
{
775
- SILABS_LOG ( " App Event Queue is uninitialized" );
775
+ ChipLogDetail (AppServer, " App Event Queue is uninitialized" );
776
776
}
777
777
}
778
778
@@ -784,7 +784,7 @@ void BaseApplication::DispatchEvent(AppEvent * aEvent)
784
784
}
785
785
else
786
786
{
787
- SILABS_LOG ( " Event received with no handler. Dropping event." );
787
+ ChipLogDetail (AppServer, " Event received with no handler. Dropping event." );
788
788
}
789
789
}
790
790
@@ -820,7 +820,7 @@ void BaseApplication::DoProvisioningReset()
820
820
CHIP_ERROR err = Server::GetInstance ().GetCommissioningWindowManager ().OpenBasicCommissioningWindow ();
821
821
if (err != CHIP_NO_ERROR)
822
822
{
823
- SILABS_LOG ( " Failed to open the Basic Commissioning Window" );
823
+ ChipLogError (AppServer, " Failed to open the Basic Commissioning Window" );
824
824
}
825
825
});
826
826
}
@@ -838,7 +838,7 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
838
838
VerifyOrReturn (event->InternetConnectivityChange .IPv4 == kConnectivity_Established );
839
839
if (DIC_OK != dic_init (dic::control::subscribeCB))
840
840
{
841
- SILABS_LOG ( " Failed to initialize DIC module \n " );
841
+ ChipLogError (AppServer, " dic_init failed " );
842
842
}
843
843
#endif // DIC_ENABLE
844
844
break ;
@@ -881,7 +881,7 @@ void BaseApplication::OutputQrCode(bool refreshLCD)
881
881
}
882
882
else
883
883
{
884
- SILABS_LOG ( " Getting QR code failed!" );
884
+ ChipLogDetail (AppServer, " Getting QR code failed!" );
885
885
}
886
886
}
887
887
0 commit comments