ml5js / ml5-next-gen

Repo for next generation of ml5.js: friendly machine learning for the web! 🤖
https://ml5js.org/
Other
77 stars 23 forks source link

Hide Debug Log Messages in Production #194

Open boussaidev opened 2 months ago

boussaidev commented 2 months ago

Hello, I'm seeing this log message when including the library. I want to hide it in production. Please add an option to enable/disable debugging or remove this log message.


🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈
🌟 Thank you for using ml5.js v1.0.1 🌟

❗❗❗
This is an experimental and unstable version 
of ml5.js. Please feel free to report any bugs
via the methods listed below.
❗❗❗

Please read our community statement to ensure 
that the use of this software reflects the values 
of the ml5.js community:
↳ https://ml5js.org/about

Reporting: 
↳ https://github.com/ml5js/ml5-next-gen/issues
↳ Email: info@ml5js.org 
🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈🌈
ziyuan-linn commented 2 months ago

Hi, @boussaidev, thank you for submitting this issue!

Currently, this message is logged almost immediately after the ml5 script gets loaded. I don't think there is a simple way to add a hide option since it has to be set/called before the message is logged.

If we decide to implement the hide option, we could delay the console log until the first ml5 model gets initialized, so there is a chance to call the hide option.

@shiffman Have this been brought up in discussions before? How do we feel about adding an option to hide the community statement console log?