Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8780] Ti API: Add console.log support

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-05-29T08:46:59.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-10 Core
ComponentsTiAPI
Labelscore, module_console, qe-port
ReporterGabriel Tavridis
AssigneeStephen Tramer
Created2012-04-18T13:43:07.000+0000
Updated2012-06-07T11:11:56.000+0000

Description

Add console.log support in Titanium Mobile see article: http://crackcelerator.com/post/19742964227/console-log-support-in-appcelerator

Comments

  1. Chris Barber 2012-04-18

    Mobile web already supports console.*() functions. :)
  2. Wilson Luu 2012-06-07

    Closing feature. Was able to use documented console.*() functions on: Tested on: SDK build: 2.1.0.v20120605190238 Titanium Studio, build: 2.1.0.201206051612 Runtime: v8 xcode: 4.3.2 Devices: Emulator 2.2, Simulator 5.1
  3. Wilson Luu 2012-06-07

    For QE, when porting, use the following test code:
       var win = Titanium.UI.createWindow({
           title : 'Test',
           backgroundColor : '#fff',
           layout : 'vertical'
       });
       
       var debugButton = Titanium.UI.createButton({
           top : 20,
           left : 10,
           right : 10,
           height : 35,
           title : 'debug'
       });
       win.add(debugButton);
       
       var errorButton = Titanium.UI.createButton({
           top : 20,
           left : 10,
           right : 10,
           height : 35,
           title : 'error'
       });
       win.add(errorButton);
       
       var infoButton = Titanium.UI.createButton({
           top : 20,
           left : 10,
           right : 10,
           height : 35,
           title : 'info'
       });
       win.add(infoButton);
       
       var logButton = Titanium.UI.createButton({
           top : 20,
           left : 10,
           right : 10,
           height : 35,
           title : 'log'
       });
       win.add(logButton);
        
       var warnButton = Titanium.UI.createButton({
           top : 20,
           left : 10,
           right : 10,
           height : 35,
           title : 'warn'
       });
       win.add(warnButton);
       
       debugButton.addEventListener('click', function() {
           console.debug('##### DEBUG !!!');
       });
          
       errorButton.addEventListener('click', function() {
           console.error('##### ERROR !!!');
       });
       
       infoButton.addEventListener('click', function() {
           console.info('##### INFO !!!');
       });
       
       logButton.addEventListener('click', function() {
           console.log('##### LOG !!!');
       });
        
       warnButton.addEventListener('click', function() {
           console.warn('##### WARN !!!');
       });
        
       win.open();
       
       

JSON Source