apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 986 forks source link

Console.log is not displayed in the safari terminal, but is displayed in the Xcode console #1394

Open tanukki2929 opened 4 months ago

tanukki2929 commented 4 months ago

The application will be a combination of Angular and Cordova

If you output console.log in Angular like window.console.log=function(){}, console.log will not be output on Safari's console log. However, when viewed in Xcode's console or mac's console.app, console.log is output and displayed.

Why is it not disabled on consoles other than Safari? Could you please tell me how to disable it?

tanukki2929 commented 4 months ago

Cordova/platforms/ios/www/cordova.js

If you configure the above file with the following setting 1 or 2 pattern, The log (console.log) can be viewed in the Xcodes console or console.app on the Mac.

Note that this setting is not relevant for Safari's console.log.

Configuration 1 var UseConsole = true; //false → true var UseLogger = true;

Configuration 2 var UseConsole = false; var UseLogger = false;//true→ false