-
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
Conversation
Timestamp: 2020-12-07 16:08:47 |
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.
Looks good 👍
65dd556
to
0f5faf9
Compare
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``` |
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.
flank-scripts/build.gradle.kts
Outdated
@@ -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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
I check it one more time and it's fine with 1.1.4
. I revert it and we check on CI.
|
||
fun IArgs.setLogLevel() = also { | ||
ftl.log.setLogLevel(logLevel) | ||
} |
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.
IMHO setSomething needs some parameter, so I would suggest to rename it to setupLogLevel
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.
done
|
||
fun logLn(message: Any = "", level: OutputLogLevel = OutputLogLevel.SIMPLE) = | ||
if (minimumLogLevel >= level) println(message) | ||
else Unit |
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.
We do not return need output from this method so I suggest to
fun log(message: Any, level: OutputLogLevel = OutputLogLevel.SIMPLE) {
if (minimumLogLevel >= level) print(message)
}
fun logLn(message: Any = "", level: OutputLogLevel = OutputLogLevel.SIMPLE) {
if (minimumLogLevel >= level) println(message)
}
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.
done
Codecov Report
@@ Coverage Diff @@
## master #1375 +/- ##
=============================================
+ Coverage 0 77.84% +77.84%
- Complexity 0 706 +706
=============================================
Files 0 245 +245
Lines 0 4713 +4713
Branches 0 904 +904
=============================================
+ Hits 0 3669 +3669
- Misses 0 551 +551
- Partials 0 493 +493 |
Fixes #1306
Test Plan
single
,verbose
,multi
output style, the output should not change.compact
(I'm not sure it's the best name for that, feel free to suggest other)yaml
,count of test and shards
,link to firebase and matrix web links
,matrix and cost reports
,table with results
Output example
Checklist