Skip to content

Commit 2d1c5e5

Browse files
committed
wmodules: Remove logging in _run SMF functions
Remove logging in `_run` SMF functions to avoid bloating application logs. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
1 parent 29763e9 commit 2d1c5e5

File tree

4 files changed

+0
-39
lines changed

4 files changed

+0
-39
lines changed

app/src/modules/app/app.c

-16
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,6 @@ static void running_run(void *o)
266266
{
267267
const struct app_state_object *state_object = (const struct app_state_object *)o;
268268

269-
LOG_DBG("%s", __func__);
270-
271269
if (state_object->chan == &FOTA_CHAN) {
272270
if (state_object->fota_status == FOTA_DOWNLOADING_UPDATE) {
273271
STATE_SET(app_state, STATE_FOTA);
@@ -312,8 +310,6 @@ static void idle_run(void *o)
312310
{
313311
const struct app_state_object *state_object = (const struct app_state_object *)o;
314312

315-
LOG_DBG("%s", __func__);
316-
317313
if ((state_object->chan == &CLOUD_CHAN) &&
318314
(state_object->status == CLOUD_CONNECTED_READY_TO_SEND)) {
319315
LOG_DBG("Cloud connected and ready, going into periodic triggering state");
@@ -358,8 +354,6 @@ static void periodic_triggering_run(void *o)
358354
{
359355
const struct app_state_object *state_object = (const struct app_state_object *)o;
360356

361-
LOG_DBG("%s", __func__);
362-
363357
if ((state_object->chan == &CLOUD_CHAN) &&
364358
((state_object->status == CLOUD_CONNECTED_PAUSED) ||
365359
(state_object->status == CLOUD_DISCONNECTED))) {
@@ -395,8 +389,6 @@ static void fota_run(void *o)
395389
{
396390
const struct app_state_object *state_object = (const struct app_state_object *)o;
397391

398-
LOG_DBG("%s", __func__);
399-
400392
if (state_object->chan == &FOTA_CHAN) {
401393
switch (state_object->fota_status) {
402394
case FOTA_CANCELED:
@@ -440,8 +432,6 @@ static void fota_network_disconnect_pending_run(void *o)
440432
{
441433
const struct app_state_object *state_object = (const struct app_state_object *)o;
442434

443-
LOG_DBG("%s", __func__);
444-
445435
if (state_object->chan == &NETWORK_CHAN) {
446436
if (state_object->network_status == NETWORK_DISCONNECTED) {
447437
STATE_SET(app_state, STATE_FOTA_IMAGE_APPLY_PENDING);
@@ -472,8 +462,6 @@ static void fota_image_apply_pending_run(void *o)
472462
{
473463
const struct app_state_object *state_object = (const struct app_state_object *)o;
474464

475-
LOG_DBG("%s", __func__);
476-
477465
if (state_object->chan == &FOTA_CHAN) {
478466
if (state_object->fota_status == FOTA_REBOOT_NEEDED) {
479467
STATE_SET(app_state, STATE_FOTA_REBOOTING);
@@ -506,8 +494,6 @@ static void app_callback(const struct zbus_channel *chan)
506494
{
507495
int err;
508496

509-
LOG_DBG("Received message on channel %s", zbus_chan_name(chan));
510-
511497
/* Update the state object with the channel that the message was received on */
512498
app_state.chan = chan;
513499

@@ -532,8 +518,6 @@ static void app_callback(const struct zbus_channel *chan)
532518
app_state.network_status = network_msg->type;
533519
}
534520

535-
LOG_DBG("Running SMF");
536-
537521
/* State object updated, run SMF */
538522
err = STATE_RUN(app_state);
539523
if (err) {

app/src/modules/cloud/cloud_module.c

-9
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ static void state_running_run(void *o)
331331
{
332332
const struct cloud_state *state_object = (const struct cloud_state *)o;
333333

334-
LOG_DBG("%s", __func__);
335-
336334
if (state_object->chan == &NETWORK_CHAN) {
337335
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
338336

@@ -366,7 +364,6 @@ static void state_disconnected_entry(void *o)
366364
static void state_disconnected_run(void *o)
367365
{
368366
const struct cloud_state *state_object = (const struct cloud_state *)o;
369-
370367
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
371368

372369
if ((state_object->chan == &NETWORK_CHAN) && (msg.type == NETWORK_CONNECTED)) {
@@ -418,8 +415,6 @@ static void state_connecting_backoff_run(void *o)
418415
{
419416
const struct cloud_state *state_object = (const struct cloud_state *)o;
420417

421-
LOG_DBG("%s", __func__);
422-
423418
if (state_object->chan == &PRIV_CLOUD_CHAN) {
424419
const enum priv_cloud_msg msg = *(const enum priv_cloud_msg *)state_object->msg_buf;
425420

@@ -518,8 +513,6 @@ static void state_connected_ready_run(void *o)
518513
int err;
519514
const struct cloud_state *state_object = (const struct cloud_state *)o;
520515

521-
LOG_DBG("%s", __func__);
522-
523516
if (state_object->chan == &NETWORK_CHAN) {
524517
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
525518

@@ -656,8 +649,6 @@ static void state_connected_paused_run(void *o)
656649
const struct cloud_state *state_object = (const struct cloud_state *)o;
657650
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
658651

659-
LOG_DBG("%s", __func__);
660-
661652
if ((state_object->chan == &NETWORK_CHAN) && (msg.type == NETWORK_CONNECTED)) {
662653
STATE_SET(cloud_state, STATE_CONNECTED_READY);
663654

app/src/modules/location/location.c

-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ void location_task(void)
219219
}
220220

221221
if (&NETWORK_CHAN == chan) {
222-
LOG_DBG("Network status received");
223222
handle_network_chan(MSG_TO_NETWORK_MSG(&msg_buf));
224223
}
225224

@@ -228,7 +227,6 @@ void location_task(void)
228227
}
229228

230229
if (&CONFIG_CHAN == chan) {
231-
LOG_DBG("Configuration received");
232230
handle_config_chan(MSG_TO_CONFIGURATION(&msg_buf));
233231
}
234232
}

app/src/modules/network/network.c

-12
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,6 @@ static void state_running_run(void *obj)
347347
{
348348
struct network_state_object const *state_object = obj;
349349

350-
LOG_DBG("state_running_run");
351-
352350
if (&NETWORK_CHAN == state_object->chan) {
353351
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
354352

@@ -394,8 +392,6 @@ static void state_disconnected_run(void *obj)
394392
{
395393
struct network_state_object const *state_object = obj;
396394

397-
LOG_DBG("state_disconnected_run");
398-
399395
if (&NETWORK_CHAN == state_object->chan) {
400396
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
401397

@@ -442,8 +438,6 @@ static void state_disconnected_searching_run(void *obj)
442438
{
443439
struct network_state_object const *state_object = obj;
444440

445-
LOG_DBG("state_disconnected_searching_run");
446-
447441
if (&NETWORK_CHAN == state_object->chan) {
448442
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
449443

@@ -466,8 +460,6 @@ static void state_disconnected_idle_run(void *obj)
466460
int err;
467461
struct network_state_object const *state_object = obj;
468462

469-
LOG_DBG("state_disconnected_idle_run");
470-
471463
if (&NETWORK_CHAN == state_object->chan) {
472464
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
473465

@@ -519,8 +511,6 @@ static void state_connected_run(void *obj)
519511
{
520512
struct network_state_object const *state_object = obj;
521513

522-
LOG_DBG("state_connected_run");
523-
524514
if (&NETWORK_CHAN == state_object->chan) {
525515
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
526516

@@ -558,8 +548,6 @@ static void state_disconnecting_run(void *obj)
558548
{
559549
struct network_state_object const *state_object = obj;
560550

561-
LOG_DBG("state_disconnecting_run");
562-
563551
if (&NETWORK_CHAN == state_object->chan) {
564552
struct network_msg msg = MSG_TO_NETWORK_MSG(state_object->msg_buf);
565553

0 commit comments

Comments
 (0)