-
Notifications
You must be signed in to change notification settings - Fork 119
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
feat: Add new output style to print smaller output #1375
Changes from 5 commits
03b366f
f1f774c
a2f2f24
f298a86
0f5faf9
8928dcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Logs in Flank | ||
|
||
1. Log level depends on the output style. | ||
1. ```Simple, multi``` and ```verbose``` output style prints logs from ```SIMPLE``` and ```DETAILED``` levels. | ||
1. ```Compact``` style prints log only from ```SIMPLE``` level. | ||
1. If you want a print message for all output styles uses ```log``` or ```logLn``` with only ```message``` parameter. | ||
1. If you want print message more detailed message use ```log``` or ```logLn``` and set ```level``` to ```OutputLogLevel.DETAILED``` | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ shadowJar.apply { | |
} | ||
} | ||
// <breaking change>.<feature added>.<fix/minor change> | ||
version = "1.1.4" | ||
version = "1.1.5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to update this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I check it one more time and it's fine with |
||
group = "com.github.flank" | ||
|
||
application { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ package ftl.args | |
import ftl.args.yml.Type | ||
import ftl.config.Device | ||
import ftl.config.common.CommonFlankConfig.Companion.defaultLocalResultsDir | ||
import ftl.log.OutputLogLevel | ||
import ftl.run.status.OutputStyle | ||
import ftl.util.timeoutToMils | ||
|
||
|
@@ -82,3 +83,10 @@ interface IArgs { | |
val validArgs: Map<String, List<String>> | ||
} | ||
} | ||
|
||
val IArgs.logLevel | ||
get() = if (outputStyle == OutputStyle.Compact) OutputLogLevel.SIMPLE else OutputLogLevel.DETAILED | ||
|
||
fun IArgs.setLogLevel() = also { | ||
ftl.log.setLogLevel(logLevel) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO setSomething needs some parameter, so I would suggest to rename it to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to update the
# output-style: single
section in the user facing docs & example yaml files?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Docs and yaml examples updated.