Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3162] Android: Ti.API.log doesn't work with one argument only

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-04-03T18:51:30.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.1.0, Sprint 2012-07
ComponentsAndroid
Labelscore, parity, qe-closed-3.2.0
ReporterStudioHitori
AssigneeChase Culpepper
Created2011-04-15T03:38:25.000+0000
Updated2014-01-06T11:27:21.000+0000

Description

I used Ti.API.log with one argument in an external JS file wrongly. It works on iPhone and a message is printed as info log. But on Android, it fails without error message and scripts after the log line are not executed.

Attachments

FileDateSize
log single argument android runtime error.png2011-11-23T15:43:45.000+000071529

Comments

  1. Dustin Hyde 2011-11-23

    Bug still valid, verified on: SDK: 1.8.0.1.v20111123144258 Studio: 1.0.7.201111221758 OS: OS X Lion Devices: all supported Android devices and emulators Comments: When log is called with one argument on iOS platforms, the error type defaults to INFO, and the message prints correctly. On Android platforms, a runtime error is thrown (screenshot attached). The documentation may need to be updated as well, as log should take two arguments (severity, message).
  2. Dustin Hyde 2012-04-18

    I could not reproduce this runtime error in 1.8.0.1 or 2.0.2. The message was correctly logged to the console as undefined when using code:
       Ti.API.log('LOG WITH ONE ARG');
       
    Console:
       [INFO][TiAPI   (  448)] undefined
       
    SDK: 1.8.0.1, 2.0.2.v20120418121806 Runtime: V8 Studio: 2.0.2.201204171552 OS: Snow Leopard Devices Tested: Android Emulator 2.3.3
  3. Priya Agarwal 2014-01-06

    Appc-Studio: 3.2.0.201312191455 Sdk:3.2.0.GA acs:1.0.11 alloy:1.3.1-beta npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.1.0 Osx: Maverick 10.9 Xcode: xCode 5.0.2 Device: HTC Desire(v4.0.3) and iPHONE Simulator(v7.0.3) Ti.API.log works for both one and more than one argument. Verified and closed

JSON Source