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
Add support for logging with multiple tags #213
Conversation
What is the current status? When can I do the review? |
Sorry, its taking me a while. I'm still working updating the Scala API side. |
@kahgoh Thanks for the status update :) |
I've pushed in the Scala API changes and think its ready for review now. I'll come back to add something for the documentation later when I get the chance. |
Codecov Report
@@ Coverage Diff @@
## v2.4 #213 +/- ##
============================================
+ Coverage 94.33% 94.39% +0.05%
- Complexity 2463 2638 +175
============================================
Files 128 131 +3
Lines 4699 5047 +348
Branches 529 655 +126
============================================
+ Hits 4433 4764 +331
- Misses 146 156 +10
- Partials 120 127 +7
Continue to review full report at Codecov.
|
Thank you very much for your commit :) I'm going to review it. Could you fix one compile error in the mean time?
For Android support, the source code still needs to be Java 6 compatible. |
tinylog-api-kotlin/src/main/kotlin/org/tinylog/kotlin/Logger.kt
Outdated
Show resolved
Hide resolved
tinylog-api-scala/src/main/scala/org/tinylog/scala/Logger.scala
Outdated
Show resolved
Hide resolved
tinylog-api-kotlin/src/main/kotlin/org/tinylog/kotlin/TaggedLogger.kt
Outdated
Show resolved
Hide resolved
tinylog-api-kotlin/src/main/kotlin/org/tinylog/kotlin/TaggedLogger.kt
Outdated
Show resolved
Hide resolved
I have just finished my review. Your code looks very well! I have found just a few minors to change. |
See issue #201.
Thanks for the feedback and review! I have just finished and pushed the changes. |
class TaggedLogger internal constructor(private val tag: String?) { | ||
class TaggedLogger internal constructor(private val tags: Set<String?>) { | ||
|
||
constructor(tag: String?) : this(setOf(tag)) |
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 really still need this constructor? If yes, could you declare the constructor as internal? I want to prohibit that users create their own instance.
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.
Nope, that constructor isn't needed anymore. I'll remove it 😉
Thank you very much for your changes! I could found only one last minor. Could to push potential further changes as new separate commits? It would make the review easier for me :) I really like your pull request! You had to change a lot of code. However, your changes are easily comprehensible. |
This simplifies the class and prevents users from initiating their own instances (they should be obtaining instances via the Logger).
I've just pushed the change to remove the internal constructor |
Thank you for your great work! I have merged your pull request with pleasure. |
This closed pull request has been locked automatically. However, please feel free to file an issue or create a new pull request. |
Description
Linked issue: #201
This change allows a single
TaggedLogger
to log to multiple tags, instead of having to create individual logger for each tag.Definition of Done
mvn verify
)Documentation
Additions or amendments for the public documentation:
tags
method.Agreements