Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28549] iOS: Newline characters in logged strings cause the log to be truncated

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2021-10-20T16:38:38.000+0000
Affected Version/sRelease 10.1.0
Fix Version/sRelease 10.1.1
Componentsn/a
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2021-10-07T16:07:32.000+0000
Updated2021-11-17T10:46:44.000+0000

Description

Description

TIMOB-28542 focused on the wrong angle of the problem as it focused on the JSON objects rather than the newline issue. So if console.log('random\nnewline\ncharacters'); is used then it doesn't show.
const win = Ti.UI.createWindow();
win.addEventListener('click', (e) => {
	console.log(e);
	console.log("{Starts with curly brace } but doesn't end with it.");
	console.log('random\nnewline\ncharacters');
});
win.open();

Steps to reproduce

1. Add the above to your app.js 2. Build to iOS and click the window

Actual

The first two logs show ok, but the third doesnt

Expected

All three logs should show correctly

Comments

  1. Ewan Harris 2021-10-07

    ioslib PR: https://github.com/appcelerator/ioslib/pull/215
  2. Ewan Harris 2021-10-08

    titanium_mobile: https://github.com/appcelerator/titanium_mobile/pull/13113
  3. Ewan Harris 2021-10-21

    Backported to 10_1_X

JSON Source