Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23295] Android: parity in Ti.API.log with iOS / Windows

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.3.0
Fix Version/sn/a
ComponentsAndroid
Labelsqe-5.3.0
ReporterHarry Bryant
AssigneeUnknown
Created2016-04-29T18:12:51.000+0000
Updated2018-02-28T19:55:43.000+0000

Description

While addressing TIMOB-23237 it was found that there were inconsistencies in Ti.API.log between all platforms. For Android to achieve parity with Windows / iOS, custom log messages need to be ignored.

TEST CODE:

Ti.API.log('meh','I am default log');
 
Ti.API.error('logging to change other Ti.API.log statements');
 
Ti.API.log('error','I am error from log');
Ti.API.log('debug', 'I am debug from log');
Ti.API.log('info', 'I am info from log');
Ti.API.log('trace', 'I am trace from log');
Ti.API.log('warn', 'I am warn from log');
*Logging on Windows Platform:*
[ERROR] :  logging to change other Ti.API.log statements
[ERROR] :  I am error from log
[DEBUG] :  I am debug from log
[INFO] :   I am info from log
[TRACE] :  I am trace from log
[WARN] :   I am warn from log
*Logging on Android Platform:*
[INFO]  [meh]  I am default log
[ERROR] logging to change other Ti.API.log statements
[ERROR] I am error from log
[INFO]  I am info from log
[WARN]  I am warn from log

Steps to Reproduce:

1. Create a Classic Titanium application. 2. Apply test code to app.js 3. Run app to Android device / emulator. 4. Observe console and compare returned log messages to Windows Platform.

Actual Result:

Custom log-level messages are printed on the Android Platform.

Expected Result

Custom log-level messages should be ignored on the Android Platform.

Comments

  1. Hans Knöchel 2016-10-02

    Reading the comments in TIMOB-23237, iOS and Windows Phones print the custom debug-level in upper-case brackets ( [INFO] [MEH] My log). So I'm wondering if the demo-logs above are still valid and whether we want to remove them or align them to iOS and Windows - which show the custom log.

JSON Source