Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27197] CLI: Reduce logging output during build

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.1.0
Fix Version/sn/a
ComponentsCLI
Labelscb-tooling
ReporterJan Vennemann
AssigneeJan Vennemann
Created2019-07-01T11:16:30.000+0000
Updated2020-01-31T22:18:43.000+0000

Description

Comments

  1. Chris Barber 2020-01-31

    I'm fine with this, however I think we need to do away with log levels in the logging system and always print every log message. Then let the tooling (CLI, Studio, etc) do the filtering. Too often we request the log output and because the log level defaults to info, the logs are useless. Perhaps we just need to write the build log to disk and make it easy for users to give us what we need?
  2. Jan Vennemann 2020-01-31

    Maybe something like NPM does? Write a ti-debug.log to the project root if the build exits with a non-zero status code.
  3. Chris Barber 2020-01-31

    Exactly, though I say let's write it regardless of the exit code. Just because the command didn't error, doesn't mean something weird happened. Furthermore, with the daemon, it won't exit. :) The Titanium CLI logger is so far from being able to do this. We'd have to buffer all log messages before filtering and them stream them to a file. I don't think that's easy. The Titanium CLI logger is used to also display all stdout/stderr messages, so there's no clear separate between UI and debug logging. Once we have a proper daemon-based build, we can use snooplogg which is far more capable. It buffers and streams. It has log levels. It has filtering. We can give the build it's own logger that streams into the daemon's logger and to a file and we can transform the stream as its being written to. Pretty exciting stuff.

JSON Source