-
Notifications
You must be signed in to change notification settings - Fork 408
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
Silence logging when running dokkaHtml #1894
Comments
Is there a workaround for this? |
I tried to find a workaround, but there's no hook. Here are my findings:
The problem: all of these are created during task execution, no injection point exists, because they're all just There is a hack where if we call Theoretically (by design?) it should be possible to replace |
To add to OP, these log messages might be meaningful when you debug something, but other than that they're just noise. Imagine if Repros on |
@IgnatBeresnev if removing is not an option, using |
Gradle plugin actually using logger to facilitate the output. For progress points Documentation on logging levels: https://docs.gradle.org/current/userguide/logging.html#logLevels dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/tasks/AbstractDokkaTask.kt Lines 219 to 227 in 6fcd66a
|
@IgnatBeresnev Coudl you please to look on the PR? |
FYI, info level is used for Maven plugin |
As I mentioned in #2915, I'm afraid it's not as simple :( A proper solution would require going over all of the messages emitted by Dokka, and then deciding which ones need to be re-written and which ones need a different logging level, as there's also a problem of level priority. In Dokka, While this change could be contributed by an external party, we'd need to agree both internally and externally beforehand on what types of messages we want to see in the final output and what should be done with the level inconsistency (and it causes even more work if we break compatibility). I don't mind it, but it can take a significant amount of time to achieve the desired result because our plate is somewhat full at the moment. I do want to revisit this issue by the stable release though, I'd say it's important.
There's no other choice - Maven doesn't have a separate level for progress messages, but it does have a |
This is the Gradle way. If you have a proper idiomatic Gradle build, the only output you get is Here are some examples of output that require taking action and therefore is part of the output:
This sounds like scope creep to me, some users just want to silence dokka, could we at least have #2915 behind a flag while this full revising of logging is happening? I would like to make a note here that these progress messages printed by Dokka are actually what Gradle outputs in the smart output only. Here are some examples: |
It might be, but Dokka is not a Gradle plugin by itself, it's an engine. And the annoying messages are not coming from the Gradle plugin, they're coming from the engine and the (default) plugins. We have other runners which also have users (CLI, Maven), and we have external contributors and plugin writers who can use the common
Re-routing
We'd have to support this flag, which is (at the moment) unnecessary maintenance burden. Not having any way to relay a message visible to the user with default settings, other than with If we can register a Gradle logger with a certain name/package/etc that could be configured by the user separately (like There are many annoying things with Dokka, we can't fix them all at once. I understand the annoyance here, but I don't understand why it's annoying you that much that it can't wait for a proper solution that would address it once and for all :) |
Describe the bug
dokkaHtml
produces the following messages with the default logging levels (e.g. lifecycle)Expected behaviour
The debugging messages should come with
debug
level or something.Frankly speaking, it is hard to understand what should the end-users do with the above messages.
Dokka configuration
Installation
The text was updated successfully, but these errors were encountered: