Skip to content

Commit

Permalink
Remove the null logger (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
hfhbd authored Apr 15, 2024
1 parent 0866e50 commit 36994fc
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import com.alecstrong.sql.psi.core.psi.SqlCreateVirtualTableStmt
import com.intellij.core.CoreApplicationEnvironment
import com.intellij.core.CoreProjectEnvironment
import com.intellij.lang.MetaLanguage
import com.intellij.openapi.diagnostic.DefaultLogger
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.project.Project
import com.intellij.openapi.roots.ContentIterator
import com.intellij.openapi.roots.ProjectFileIndex
Expand Down Expand Up @@ -39,16 +37,9 @@ import java.io.File
import kotlin.reflect.KClass

private class ApplicationEnvironment {
private val logger = object : DefaultLogger("") {
override fun warn(message: String?, t: Throwable?) = Unit
override fun error(message: Any?) = Unit
}

val disposable = Disposer.newDisposable()

val coreApplicationEnvironment: CoreApplicationEnvironment = CoreApplicationEnvironment(disposable).apply {
Logger.setFactory { logger }

CoreApplicationEnvironment.registerApplicationExtensionPoint(
MetaLanguage.EP_NAME,
MetaLanguage::class.java,
Expand Down

0 comments on commit 36994fc

Please sign in to comment.