Skip to content

Commit 8ffcba4

Browse files
committed
logging
Former-commit-id: 473c71d
1 parent 32283f2 commit 8ffcba4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

marker/src/main/kotlin/spp/jetbrains/marker/plugin/SourceInlayHintProvider.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import com.intellij.openapi.fileEditor.FileEditorManager
1818
import com.intellij.psi.PsiElement
1919
import com.intellij.psi.PsiFile
2020
import com.intellij.ui.paint.EffectPainter
21+
import org.slf4j.LoggerFactory
2122
import spp.jetbrains.marker.SourceMarker
2223
import spp.jetbrains.marker.SourceMarker.getSourceFileMarker
2324
import spp.jetbrains.marker.source.mark.api.key.SourceKey
@@ -41,6 +42,8 @@ import javax.swing.JPanel
4142
abstract class SourceInlayHintProvider : InlayHintsProvider<NoSettings> {
4243

4344
companion object {
45+
private val log = LoggerFactory.getLogger(SourceInlayHintProvider::class.java)
46+
4447
@Volatile
4548
@JvmField
4649
var latestInlayMarkAddedAt: Long = -1L
@@ -84,6 +87,7 @@ abstract class SourceInlayHintProvider : InlayHintsProvider<NoSettings> {
8487
sink: InlayHintsSink
8588
): InlayHintsCollector? {
8689
if (!SourceMarker.enabled) {
90+
log.warn("SourceMarker is disabled. Skipping inlay hints.")
8791
return null
8892
}
8993

marker/src/main/kotlin/spp/jetbrains/marker/source/mark/SourceMarkPopupAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ open class SourceMarkPopupAction : AnAction() {
2828

2929
override fun update(@NotNull e: AnActionEvent) {
3030
if (!SourceMarker.enabled) {
31-
log.warn("SourceMarker popup action disabled")
31+
log.warn("SourceMarker disabled. Ignoring popup action.")
3232
return
3333
}
3434

plugin/src/main/kotlin/spp/jetbrains/sourcemarker/SourceMarkerPlugin.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ object SourceMarkerPlugin {
543543
}
544544

545545
private fun initMarker(config: SourceMarkerConfig, project: Project) {
546+
log.info("Initializing marker")
546547
SourceMarker.addGlobalSourceMarkEventListener(PluginSourceMarkEventListener())
547548

548549
val gutterMarkConfig = GutterMarkConfiguration()
@@ -580,6 +581,7 @@ object SourceMarkerPlugin {
580581
}
581582
}
582583
SourceMarker.enabled = true
584+
log.info("Source marker enabled")
583585

584586
//force marker re-processing
585587
DaemonCodeAnalyzer.getInstance(project).restart()

0 commit comments

Comments
 (0)