Project: appceleratorstudio
Issue TISTUD-4934: Debug and Profile on Device: Android and iOS: log level intermittently not respected in console on launch
This is a clone of TISTUD-4882 to address possible related problematic behavior. Debug on Device: Android and iOS: log level not respected. Sometimes the old console log level is used instead of trace. Note this ticket might be invalid, as we might actually want to use the existing console level. Also note the device run config does not allow the user to select a preferred default log level. This does not appear to be a regression. The builds are launched with log level 'TRACE': {code} "/usr/local/bin/titanium" "--no-colors" "--no-prompt" "build" "--platform" "ios" "--sdk" "3.1.1.v20130604110432" "--log-level" "trace" "--target" "device" "--ios-version" "6.1" "--developer-name" "Dustin Hyde (R766MCANNQ)" "--distribution-name" "Dustin Hyde (R766MCANNQ)" "--pp-uuid" "AEDDA127-DC85-4B6E-93C9-F5498C570E0B" "--deploy-type" "development" "--debug-host" "::1370463608993:192.168.0.166" "--skip-js-minify" "/usr/local/bin/titanium" "--no-colors" "--no-prompt" "build" "--platform" "android" "--sdk" "3.1.1.v20130604110432" "--log-level" "trace" "--target" "device" "--android-sdk" "/Users/dhyde/Desktop/android/android-sdk" "--avd-id" "4" "--debug-host" "adb:9419" "--skip-js-minify" {code} When the log level is changed in the console during runtime, the changes do not take effect (TISTUD-4882), so the initial launch level cannot be changed. If TISTUD-4882 is fixed, this ticket may no longer have the same severity. Test Steps: 1. Launch app in Device Debug mode. 2. Change log level in console view. Result: No effect. Intermittently the default log level is not trace, but the previous log level from the existing console. Sample Code (insert breakpoints as needed): {code} var win = Ti.UI.createWindow({ backgroundColor : 'blue' }); var button = Ti.UI.createButton({ title : 'click', top : '40%', bottom : '40%', left : '30%', right : '30%' }); button.addEventListener('click', function() { console.log('console.log()'); console.log(['arg0', 'arg1', 'arg2']); console.debug('console.debug()'); console.debug(['arg0', 'arg1', 'arg2']); console.info('console.info()'); console.info(['arg0', 'arg1', 'arg2']); console.warn('console.warn()'); console.warn(['arg0', 'arg1', 'arg2']); console.error('console.error()'); console.error(['arg0', 'arg1', 'arg2']); Ti.API.trace('Ti.API.trace()'); Ti.API.trace(['arg0', 'arg1', 'arg2']); Ti.API.debug('Ti.API.debug()'); Ti.API.debug(['arg0', 'arg1', 'arg2']); Ti.API.info('Ti.API.info()'); Ti.API.info(['arg0', 'arg1', 'arg2']); Ti.API.warn('Ti.API.warn()'); Ti.API.warn(['arg0', 'arg1', 'arg2']); Ti.API.error('Ti.API.error()'); Ti.API.error(['arg0', 'arg1', 'arg2']); Ti.API.log('TRACE', 'Ti.API.log(TRACE)'); Ti.API.log('TRACE', ['arg0', 'arg1', 'arg2']); Ti.API.log('DEBUG', 'Ti.API.log(DEBUG)'); Ti.API.log('DEBUG', ['arg0', 'arg1', 'arg2']); Ti.API.log('INFO', 'Ti.API.log(INFO)'); Ti.API.log('INFO', ['arg0', 'arg1', 'arg2']); Ti.API.log('WARN', 'Ti.API.log(WARN)'); Ti.API.log('WARN', ['arg0', 'arg1', 'arg2']); Ti.API.log('ERROR', 'Ti.API.log(ERROR)'); Ti.API.log('ERROR', ['arg0', 'arg1', 'arg2']); Ti.API.log('LOG', 'Ti.API.log(LOG)'); Ti.API.log('LOG', ['arg0', 'arg1', 'arg2']); switch(Ti.Platform.osname) { case 'ipad': case 'iphone': { Ti.API.timestamp('Ti.API.timestamp()'); Ti.API.timestamp(['arg0', 'arg1', 'arg2']); } } }); win.add(button); win.open(); {code}
Story points: 5