Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fully disable cam_hal logging? #498

Closed
AgainPsychoX opened this issue Jan 22, 2023 · 3 comments
Closed

How to fully disable cam_hal logging? #498

AgainPsychoX opened this issue Jan 22, 2023 · 3 comments

Comments

@AgainPsychoX
Copy link
Contributor

I think one can disable logs per component name using esp_log_level_set("cam_hal", ESP_LOG_INFO);, however some of logs generated by this library don't use standard way of logging in ESP, but ESP_CAMERA_ETS_PRINTF macro which is ets_printf.

Example:

cam_hal: EV-EOF-OVF
W (29504) cam_hal: NO-SOI    // Can be disabled using the function described above
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-EOF-OVF
cam_hal: EV-VSYNC-OVF

Another small issue is they look not as nice in the logs (missing the standard prefix).

The only instance of this is at ll_cam_send_event function:

void IRAM_ATTR ll_cam_send_event(cam_obj_t *cam, cam_event_t cam_event, BaseType_t * HPTaskAwoken)
{
if (xQueueSendFromISR(cam->event_queue, (void *)&cam_event, HPTaskAwoken) != pdTRUE) {
ll_cam_stop(cam);
cam->state = CAM_STATE_IDLE;
ESP_CAMERA_ETS_PRINTF(DRAM_STR("cam_hal: EV-%s-OVF\r\n"), cam_event==CAM_IN_SUC_EOF_EVENT ? DRAM_STR("EOF") : DRAM_STR("VSYNC"));
}
}

I guess there maybe is no way to efficiently use standard logging (ESP_LOGX) inside this IRAM_ATTR-marked function, but how about making some macro (configurable form Kconfig?) as option to disable this one log?

@igrr
Copy link
Member

igrr commented Jan 22, 2023

I guess there maybe is no way to efficiently use standard logging (ESP_LOGX) inside this IRAM_ATTR-marked function

It should be possible to use ESP_DRAM_LOGx for this.

The only issue is that it was added in IDF v4.2, while this library has to support v4.1 and later, at least until February when IDF v4.1 will become EoL. I would probably suggest waiting until then, removing v4.1 support, and then replacing the logging macros with ESP_DRAM_LOGx.

@github-actions
Copy link

This issue appears to be stale. Please close it if its no longer valid.

@ucfncouch
Copy link

I am trying to figure out how to full disable cam_hal messages. I am trying to view some output in the terminal put they are completely drowned out by constant cam_hal messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants