Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #869 Reduce log levels for `Info` and `Debug` `Debug -> Trace` `Info -> Debug` Also adds a `RunBuffered` to `exec` to allow `Command`s to be run and the output buffered to a circular buffer. The output is printed out at the current log level if an error occurs. The result is a quiet terminal when things go well and context output when things fail. Some examples: ``` ftl serve --recreate --allow-origins "*" info: Starting FTL with 1 controller(s) and 0 runner(s) info:controller0: Web console available at: http://localhost:5173 ``` ``` ftl build examples/kotlin/ftl-module-api info: Building kotlin module 'api' info: Successfully built module 'api' in 7.26s ``` ``` ftl deploy examples/go/httpingress info: Building go module 'httpingress' info: Successfully built module 'httpingress' in 3.99s info: Preparing module 'httpingress' for deployment info: Successfully created deployment httpingress-5792064876 ``` ``` ftl dev examples/kotlin info: Building kotlin module 'api' info: Successfully built module 'api' in 8.85s info: Preparing module 'api' for deployment info: Successfully created deployment api-5837eca0af info: Building kotlin module 'echo' info: Successfully built module 'echo' in 6.95s info: Preparing module 'echo' for deployment info: Successfully created deployment echo-31ad4e0677 info: Building kotlin module 'ad' info: Successfully built module 'ad' in 7.63s info: Preparing module 'ad' for deployment info: Successfully created deployment ad-e75c5b489a ``` And some error examples: ``` ftl dev examples/kotlin/ftl-module-echo info: Building kotlin module 'echo' info: r [INFO] [INFO] --- exec:3.0.0:exec (default) @ ftl-module-echo --- Generated module: /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/target/generated-sources/ftl/builtin/BuiltinModuleClient.kt [INFO] [INFO] --- build-helper:3.2.0:add-source (default) @ ftl-module-echo --- [INFO] Source directory: /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/target/generated-sources/ftl added. [INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ ftl-module-echo --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/resources [INFO] [INFO] --- compiler:3.11.0:compile (default-compile) @ ftl-module-echo --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- kotlin:1.9.0:compile (compile) @ ftl-module-echo --- [WARNING] Source root doesn't exist: /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/java [WARNING] Using experimental Kotlin incremental compilation [INFO] Non-incremental compilation will be performed: NO_BUILD_HISTORY [INFO] Kotlin compile iteration: /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt, /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/target/generated-sources/ftl/builtin/BuiltinModuleClient.kt [INFO] Exit code: COMPILATION_ERROR [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt: (3, 12) Unresolved reference: time [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt: (4, 12) Unresolved reference: time [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt: (20, 28) Not enough information to infer type variable R [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt: (20, 33) Unresolved reference: TimeModuleClient [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt: (20, 51) Unresolved reference: time [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt: (20, 57) Unresolved reference: TimeRequest [INFO] Compiled 2 Kotlin files using incremental compiler [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.369 s [INFO] Finished at: 2024-02-05T11:59:18-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.9.0:compile (compile) on project ftl-module-echo: Compilation failure: Compilation failure: [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt:[3,12] Unresolved reference: time [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt:[4,12] Unresolved reference: time [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt:[20,28] Not enough information to infer type variable R [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt:[20,33] Unresolved reference: TimeModuleClient [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt:[20,51] Unresolved reference: time [ERROR] /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo/src/main/kotlin/ftl/echo/Echo.kt:[20,57] Unresolved reference: TimeRequest [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException error: Error deploying module /Users/wesbillman/dev/ftl/examples/kotlin/ftl-module-echo. Will retry: failed to build module: exit status 1 info: Building kotlin module 'echo' ```
- Loading branch information