Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25809] ES6: Logs do not work anymore

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2019-05-14T21:53:41.000+0000
Affected Version/sRelease 7.1.0
Fix Version/sn/a
ComponentsiOS
LabelsengTriage, es6, logging
ReporterHans Knöchel
AssigneeUnknown
Created2018-02-25T13:50:51.000+0000
Updated2019-05-14T21:53:41.000+0000

Description

While migrating my [canteen app](https://github.com/hansemannn/studentenfutter-app) to ES6, I noticed that logs (e.g. Ti.API.warn) do not work anymore. The only logs appearing are:
[TRACE]  [ioslib] App launched
[TRACE]  [ioslib] Trying to connect to log server port 28416...
[TRACE]  [ioslib] Connected to log server port 28416
-- Start simulator log -------------------------------------------------------
[TRACE]  updating tiapp metadata with Appcelerator Platform...
[TRACE]  Uploaded tiapp metadata with Appcelerator Platform!
To reproduce:
 var win = Ti.UI.createWindow({
   backgroundColor: '#fff'
});

var btn = Ti.UI.createButton({
  title: 'Trigger'
});

btn.addEventListener('click', function() {
  Ti.API.error('Hello?')
});

win.add(btn);
win.open();

Comments

  1. Ewan Harris 2018-02-26

    [~hknoechel] Weird, I'm using the same SDK version and I can see the logs just fine from both ti and appc
       [TRACE] [ioslib] Connected to log server port 55408
       -- Start simulator log -------------------------------------------------------
       [DEBUG] Reading stylesheet from: /Users/eharris/Library/Developer/CoreSimulator/Devices/19A348C6-7F86-4096-AEDE-90BB291BC971/data/Containers/Bundle/Application/58E5F4B5-6983-46F5-98E5-612834262309/prodteamclassic.app/stylesheet.plist
       [INFO]  prodteamclassic/1.0 (7.1.0.50003f5)
       [DEBUG] Loading: /Users/eharris/Library/Developer/CoreSimulator/Devices/19A348C6-7F86-4096-AEDE-90BB291BC971/data/Containers/Bundle/Application/58E5F4B5-6983-46F5-98E5-612834262309/prodteamclassic.app/app.js, Resource: app_js
       [DEBUG] Loading: /Users/eharris/Library/Developer/CoreSimulator/Devices/19A348C6-7F86-4096-AEDE-90BB291BC971/data/Containers/Bundle/Application/58E5F4B5-6983-46F5-98E5-612834262309/prodteamclassic.app/_app_props_.json, Resource: _app_props__json
       [DEBUG] Application booted in 56.133986 ms
       [TRACE] Uploaded tiapp metadata with Appcelerator Platform!
       [ERROR] Hello?
       [ERROR] Hello?
       [ERROR] Hello?
       [ERROR] Hello?
       [ERROR] Hello?
       
  2. Alan Hutton 2019-04-16

    Unable to reproduce.I can also see the logs just fine from both ti and appc. Node.js Node.js Version = 8.11.3 npm Version = 6.7.0 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 8.0.0.GA

JSON Source