Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12169] CLI: Project compilation - no build.log is being created

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-11-18T18:22:01.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.0.0
ComponentsCLI
Labelscli, ft, ios, qe-ios100112, qe-manualtest, usability
ReporterOlga Romero
AssigneeTim Poulsen
Created2012-12-30T06:58:11.000+0000
Updated2015-02-06T08:42:56.000+0000

Description

Building a mobile project to iOS device or simulator wont create build.log if CLI is enabled. Occurs in 3.0.0 and 3.1.0 Test steps: 1. Create a project in Titanium Studio 2. Run it as iOS simulator or build it to device 3. Check project's build folder for build.log Actual result: No build.log Expected result: build.log should be created in both scenarios (success or failure)

Comments

  1. Ingo Muschenetz 2014-04-28

    Out of bandwidth for 3.3.0. Bumping to next version.
  2. Tim Poulsen 2014-10-29

    [~ingo] Is there some sort of spec for this? What gets logged, at what levels? The ticket speaks to this being an iOS issue, but I assume logging should be done on all platforms, right?
  3. Chris Barber 2014-10-29

    [~skypanther] There's no spec beyond what the old Python scripts used to do. I was hoping to rip out the Winston logger and replace it with a new logger that supported the ability for specific commands (i.e. build) to opt-in and have all log calls written to a file in addition to the exact command being run, the information found on "ti info", and other various Node/NPM information. I know Winston has the ability to log to a file, I just don't think it's going to be versatile enough.
  4. Tim Poulsen 2014-10-31

    [~cbarber] I've got logging working. However, on Android & MobileWeb, the contents of the build/platform directory are cleared partway through the build process. That, of course, blows away the build.log file. Why are those directories emptied and would there be issues if I prevented the build.log file from being deleted during that step? Hints on where that's happening in the code?
  5. Tim Poulsen 2014-10-31

    PR: https://github.com/appcelerator/titanium_mobile/pull/6297 With this change, a build log file, such as build_iphone.log, is created in the build folder rather than the platform folder within. In this way, we're sure that the log is not included with any packaged app. I updated the ti clean function to remove the log files in addition to the platform directories. Functional test: 1. Build a project for any platform. 2. Open project/build/build_PLATFORM.log in a text editor and confirm that trace-level logging is output to that file. 3. Build again for the same platform. New logging entries are appended to the same file. 4. Build for another platform to confirm a separate log file is created. 5. Run ti clean to confirm that all directories and log files from the build folder are removed
  6. Chris Barber 2014-11-05

    Review failed. Please see comments in PR.
  7. Tim Poulsen 2014-11-06

    PR updated to address Chris's comments. Functional review additions: In addition to the steps above, build the project from a folder other than the project folder. For example, from the Titanium_Studio_Workspace folder: 1. Run ti build -p ios --project-dir yourappfolder. The log should be created properly in the project's build folder. 2. Run ti clean --project-dir yourappfolder and the build folder should be emptied. 3. Run ti build -p ios and when prompted, enter your project's folder name. The log should be created properly in the project's build folder.
  8. Tim Poulsen 2014-11-14

    PR updated per Chris' comments
  9. Khushbu Agrawal 2015-02-06

    Verified with below Test Environment: 1. Mac OSX Yosemite 10.10 2. Appcelerator Studio, build: 4.0.0.201502031850 3. Titanium SDK, build: 4.0.0.v20150205163226 4. Titanium CLI, build: 3.6.0-dev 5. Alloy: 1.5.1 6. Xcode 6.1 7. iOS SDK 8.1 8. S Galaxy S5 with Android 4.4.2 The log is created properly in project's build folder respective to specified platform. Also the logs are created if building the project outside the project directory. So closing this ticket as working as expected.

JSON Source