Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore messages emitted by the IntelliJ Logger (#2563)
(cherry picked from commit 0cdb6d4)
- Loading branch information
1 parent
b6ba965
commit 5633f27
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.jetbrains.dokka.base.utils | ||
|
||
import com.intellij.openapi.diagnostic.Attachment | ||
import com.intellij.openapi.diagnostic.DefaultLogger | ||
import com.intellij.openapi.diagnostic.Logger | ||
|
||
internal class NoopIntellijLoggerFactory : Logger.Factory { | ||
override fun getLoggerInstance(p0: String): Logger = NoopIntellijLogger | ||
} | ||
|
||
/** | ||
* Ignores all messages passed to it | ||
*/ | ||
internal object NoopIntellijLogger : DefaultLogger(null) { | ||
override fun isDebugEnabled(): Boolean = false | ||
override fun isTraceEnabled(): Boolean = false | ||
|
||
override fun debug(message: String?) {} | ||
override fun debug(t: Throwable?) {} | ||
override fun debug(message: String?, t: Throwable?) {} | ||
override fun debug(message: String, vararg details: Any?) {} | ||
override fun debugValues(header: String, values: MutableCollection<*>) {} | ||
|
||
override fun trace(message: String?) {} | ||
override fun trace(t: Throwable?) {} | ||
|
||
override fun info(message: String?) {} | ||
override fun info(message: String?, t: Throwable?) {} | ||
override fun info(t: Throwable) {} | ||
|
||
override fun warn(message: String?, t: Throwable?) {} | ||
override fun warn(message: String?) {} | ||
override fun warn(t: Throwable) {} | ||
|
||
override fun error(message: String?, t: Throwable?, vararg details: String?) {} | ||
override fun error(message: String?) {} | ||
override fun error(message: Any?) {} | ||
override fun error(message: String?, vararg attachments: Attachment?) {} | ||
override fun error(message: String?, t: Throwable?, vararg attachments: Attachment?) {} | ||
override fun error(message: String?, vararg details: String?) {} | ||
override fun error(message: String?, t: Throwable?) {} | ||
override fun error(t: Throwable) {} | ||
} |