[TIMOB-27197] CLI: Reduce logging output during build
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 8.1.0 |
Fix Version/s | n/a |
Components | CLI |
Labels | cb-tooling |
Reporter | Jan Vennemann |
Assignee | Jan Vennemann |
Created | 2019-07-01T11:16:30.000+0000 |
Updated | 2020-01-31T22:18:43.000+0000 |
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?
Maybe something like NPM does? Write a
ti-debug.log
to the project root if the build exits with a non-zero status code.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.