What is the console.log management plan?

in the daily code, we may have a lot of console.log, that may be deleted before each release
do you have any good management methods to enable the test environment to configure whether to print logs, and the production environment to delete console from the code
Today, I think it"s good to see the code written by someone.

    __DEBUG__&&console.log("-sharp--baseUrl:", baseUrl);
    __DEBUG__&&console.log("-sharp--:", `${baseUrl}${url}`);
    __DEBUG__&&console.log("-------------------------");

but I don"t know how to delete this line when packing. I only delete the line with console in the business code. I can"t delete the
in the framework and library. Or do you have any good solutions

?
Jul.15,2021

how can there be a lot of console.log in daily code? delete a function directly after it has been developed. You don't have to keep it.


write an automated program that can be used on build or online versions, and automatically delete all log, info, error, warn
if you already have packaging process tools, such as webpack, you can search for a plug-in that specifically goes to console, or write one yourself

  

see what packaging tool you use. This can be done with the plug-in uglifyjs-webpack-plugin in webpack.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a01b-2c1bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a01b-2c1bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?