@@ -232,15 +232,15 @@ CHIP_ERROR BaseApplication::StartAppTask(osThreadFunc_t taskFunction)
232
232
sAppEventQueue = osMessageQueueNew (APP_EVENT_QUEUE_SIZE, sizeof (AppEvent), &appEventQueueAttr);
233
233
if (sAppEventQueue == NULL )
234
234
{
235
- SILABS_LOG ( " Failed to allocate app event queue" );
235
+ ChipLogDetail (AppServer, " Failed to allocate app event queue" );
236
236
appError (APP_ERROR_EVENT_QUEUE_FAILED);
237
237
}
238
238
239
239
// Start App task.
240
240
sAppTaskHandle = osThreadNew (taskFunction, &sAppEventQueue , &appTaskAttr);
241
241
if (sAppTaskHandle == nullptr )
242
242
{
243
- SILABS_LOG ( " Failed to create app task" );
243
+ ChipLogDetail (AppServer, " Failed to create app task" );
244
244
appError (APP_ERROR_CREATE_TASK_FAILED);
245
245
}
246
246
return CHIP_NO_ERROR;
@@ -254,12 +254,12 @@ CHIP_ERROR BaseApplication::Init()
254
254
/*
255
255
* Wait for the WiFi to be initialized
256
256
*/
257
- SILABS_LOG ( " APP: Wait WiFi Init" );
257
+ ChipLogDetail (AppServer, " APP: Wait WiFi Init" );
258
258
while (!wfx_hw_ready ())
259
259
{
260
260
vTaskDelay (pdMS_TO_TICKS (10 ));
261
261
}
262
- SILABS_LOG ( " APP: Done WiFi Init" );
262
+ ChipLogDetail (AppServer, " APP: Done WiFi Init" );
263
263
/* We will init server when we get IP */
264
264
265
265
chip::DeviceLayer::PlatformMgr ().LockChipStack ();
@@ -276,7 +276,7 @@ CHIP_ERROR BaseApplication::Init()
276
276
);
277
277
if (sFunctionTimer == NULL )
278
278
{
279
- SILABS_LOG ( " funct timer create failed" );
279
+ ChipLogDetail (AppServer, " funct timer create failed" );
280
280
appError (APP_ERROR_CREATE_TIMER_FAILED);
281
281
}
282
282
@@ -288,12 +288,12 @@ CHIP_ERROR BaseApplication::Init()
288
288
);
289
289
if (sLightTimer == NULL )
290
290
{
291
- SILABS_LOG ( " Light Timer create failed" );
291
+ ChipLogDetail (AppServer, " Light Timer create failed" );
292
292
appError (APP_ERROR_CREATE_TIMER_FAILED);
293
293
}
294
294
295
- SILABS_LOG ( " Current Software Version String: %s" , CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING);
296
- SILABS_LOG ( " Current Software Version: %d" , CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
295
+ ChipLogDetail (AppServer, " Current Software Version String: %s" , CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING);
296
+ ChipLogDetail (AppServer, " Current Software Version: %d" , CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
297
297
298
298
ConfigurationMgr ().LogDeviceConfig ();
299
299
@@ -543,12 +543,12 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent)
543
543
chip::DeviceLayer::PlatformMgr ().UnlockChipStack ();
544
544
if (err != CHIP_NO_ERROR)
545
545
{
546
- SILABS_LOG ( " Failed to open the Basic Commissioning Window" );
546
+ ChipLogDetail (AppServer, " Failed to open the Basic Commissioning Window" );
547
547
}
548
548
}
549
549
else
550
550
{
551
- SILABS_LOG ( " Network is already provisioned, Ble advertisement not enabled" );
551
+ ChipLogDetail (AppServer, " Network is already provisioned, Ble advertisement not enabled" );
552
552
#if CHIP_CONFIG_ENABLE_ICD_SERVER
553
553
// Temporarily claim network activity, until we implement a "user trigger" reason for ICD wakeups.
554
554
PlatformMgr ().ScheduleWork ([](intptr_t ) { ICDNotifier::GetInstance ().NotifyNetworkActivityNotification (); });
@@ -571,7 +571,7 @@ void BaseApplication::CancelFunctionTimer()
571
571
{
572
572
if (osTimerStop (sFunctionTimer ) == osError)
573
573
{
574
- SILABS_LOG ( " app timer stop() failed" );
574
+ ChipLogDetail (AppServer, " app timer stop() failed" );
575
575
appError (APP_ERROR_STOP_TIMER_FAILED);
576
576
}
577
577
}
@@ -581,15 +581,15 @@ void BaseApplication::StartFunctionTimer(uint32_t aTimeoutInMs)
581
581
// Starts or restarts the function timer
582
582
if (osTimerStart (sFunctionTimer , pdMS_TO_TICKS (aTimeoutInMs)) != osOK)
583
583
{
584
- SILABS_LOG ( " app timer start() failed" );
584
+ ChipLogDetail (AppServer, " app timer start() failed" );
585
585
appError (APP_ERROR_START_TIMER_FAILED);
586
586
}
587
587
}
588
588
589
589
void BaseApplication::StartFactoryResetSequence ()
590
590
{
591
591
// Initiate the factory reset sequence
592
- SILABS_LOG ( " Factory Reset Triggered. Release button within %ums to cancel." , FACTORY_RESET_CANCEL_WINDOW_TIMEOUT);
592
+ ChipLogDetail (AppServer, " Factory Reset Triggered. Release button within %ums to cancel." , FACTORY_RESET_CANCEL_WINDOW_TIMEOUT);
593
593
594
594
// Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to
595
595
// cancel, if required.
@@ -618,15 +618,15 @@ void BaseApplication::CancelFactoryResetSequence()
618
618
if (sIsFactoryResetTriggered )
619
619
{
620
620
sIsFactoryResetTriggered = false ;
621
- SILABS_LOG ( " Factory Reset has been Canceled" );
621
+ ChipLogDetail (AppServer, " Factory Reset has been Canceled" );
622
622
}
623
623
}
624
624
625
625
void BaseApplication::StartStatusLEDTimer ()
626
626
{
627
627
if (osTimerStart (sLightTimer , kLightTimerPeriod ) != osOK)
628
628
{
629
- SILABS_LOG ( " Light Time start failed" );
629
+ ChipLogDetail (AppServer, " Light Time start failed" );
630
630
appError (APP_ERROR_START_TIMER_FAILED);
631
631
}
632
632
}
@@ -639,7 +639,7 @@ void BaseApplication::StopStatusLEDTimer()
639
639
640
640
if (osTimerStop (sLightTimer ) == osError)
641
641
{
642
- SILABS_LOG ( " Light Time start failed" );
642
+ ChipLogDetail (AppServer, " Light Time start failed" );
643
643
appError (APP_ERROR_STOP_TIMER_FAILED);
644
644
}
645
645
}
@@ -770,12 +770,12 @@ void BaseApplication::PostEvent(const AppEvent * aEvent)
770
770
{
771
771
if (osMessageQueuePut (sAppEventQueue , aEvent, osPriorityNormal, 0 ) != osOK)
772
772
{
773
- SILABS_LOG ( " Failed to post event to app task event queue" );
773
+ ChipLogDetail (AppServer, " Failed to post event to app task event queue" );
774
774
}
775
775
}
776
776
else
777
777
{
778
- SILABS_LOG ( " App Event Queue is uninitialized" );
778
+ ChipLogDetail (AppServer, " App Event Queue is uninitialized" );
779
779
}
780
780
}
781
781
@@ -787,7 +787,7 @@ void BaseApplication::DispatchEvent(AppEvent * aEvent)
787
787
}
788
788
else
789
789
{
790
- SILABS_LOG ( " Event received with no handler. Dropping event." );
790
+ ChipLogDetail (AppServer, " Event received with no handler. Dropping event." );
791
791
}
792
792
}
793
793
@@ -823,7 +823,7 @@ void BaseApplication::DoProvisioningReset()
823
823
CHIP_ERROR err = Server::GetInstance ().GetCommissioningWindowManager ().OpenBasicCommissioningWindow ();
824
824
if (err != CHIP_NO_ERROR)
825
825
{
826
- SILABS_LOG ( " Failed to open the Basic Commissioning Window" );
826
+ ChipLogError (AppServer, " Failed to open the Basic Commissioning Window" );
827
827
}
828
828
});
829
829
}
@@ -841,7 +841,7 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
841
841
VerifyOrReturn (event->InternetConnectivityChange .IPv4 == kConnectivity_Established );
842
842
if (DIC_OK != dic_init (dic::control::subscribeCB))
843
843
{
844
- SILABS_LOG ( " Failed to initialize DIC module \n " );
844
+ ChipLogError (AppServer, " dic_init failed " );
845
845
}
846
846
#endif // DIC_ENABLE
847
847
break ;
@@ -884,7 +884,7 @@ void BaseApplication::OutputQrCode(bool refreshLCD)
884
884
}
885
885
else
886
886
{
887
- SILABS_LOG ( " Getting QR code failed!" );
887
+ ChipLogDetail (AppServer, " Getting QR code failed!" );
888
888
}
889
889
}
890
890
0 commit comments