Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging framework for Flank #446

Closed
bootstraponline opened this issue Jan 9, 2019 · 5 comments · Fixed by #646
Closed

Logging framework for Flank #446

bootstraponline opened this issue Jan 9, 2019 · 5 comments · Fixed by #646

Comments

@bootstraponline
Copy link
Contributor

bootstraponline commented Jan 9, 2019

Use what ktor is using for logging. Add --debug flag and debug: true option in flank yaml.

print detected macOS version in FtlConstants.kt

val macOS: Boolean = (System.getProperty("os.name") ?: "").toLowerCase().indexOf("mac") >= 0

if a mac is detected as linux then sharding may fail (if the bundled nm binary isn't up to date).

@valeraz
Copy link
Contributor

valeraz commented Jan 9, 2019

This lib on top of slf4j seems to be pretty popular: https://github.com/MicroUtils/kotlin-logging

@bootstraponline
Copy link
Contributor Author

MicroUtils/kotlin-logging looks great

@bootstraponline
Copy link
Contributor Author

@jan-goral jan-goral self-assigned this Feb 27, 2020
jan-goral added a commit that referenced this issue Mar 2, 2020
@jan-goral jan-goral mentioned this issue Mar 2, 2020
2 tasks
@jan-goral
Copy link
Contributor

Hi @bootstraponline , I need some clarifications if debug option should work for any command or only for android run and ios run. I am asking because the first option sound much more reasonable, but it also brings much more changes in implementation.
For example, if debug flag should work for all commands and can be passed from cli and also from config file, it requires to handle configuration file in Main instead of AndroidRunCommand and AndroidRunCommand. It will also change order of cli args --config flag will be first before any other command.
The simplest solution to achieve first option without doing any changes with handling configuration files, can be allowing debug flag only by cli. Correct me if I am wrong.

@bootstraponline
Copy link
Contributor Author

I think allowing debug flag only by CLI is fine. I like going with the simplest possible solution first. We can always add complexity later if it's truly necessary.

jan-goral added a commit that referenced this issue Mar 4, 2020
jan-goral added a commit that referenced this issue Mar 5, 2020
* Disable or enable logging depending on debug option
* Add kotlin-logging dependency
#446
@bootstraponline bootstraponline added this to the May 2020 milestone Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants