How to stop logging everything to console?

Options
caroline
caroline Member

Hi, I'm not sure where to toggle the setting to turn daily logs off. I'm using the daily API in a React application.


Tagged:

Answers

  • Tamara
    Tamara Moderator, Dailynista admin
    Options

    Hi @caroline, what version of react are you building with? In our latest Daily versions it should be possible to control logging in the console, enabling or disabling dynamically (type enableDailyLogger() or disableDailyLogger() in your console).

  • caroline
    caroline Member
    edited March 2023
    Options

    Thank you @Tamara ! Is this documented anywhere? Do I call disableDailyLogger() on the callObject?

    I'm using versions:

    "@daily-co/daily-js": "^0.31.0",

    "@daily-co/daily-react-hooks": "^0.5.0",

    "react": "^18.2.0",

  • Tamara
    Tamara Moderator, Dailynista admin
    Options

    HI Caroline, sorry for not catching your reply sooner! This is currently undocumented, but you can enable it by typing it directly into your browser console. Make sure you upgrade to the latest Daily JS first, which is version 0.40.0 (and check to see if that won't break anything for you).

    You can also disable logs simply with window.disableDailyLogger() while in a call and the setting will stick.