fix: logging now actually works

This commit is contained in:
zaaarf 2023-11-17 00:03:26 +01:00
parent 9ff8de0df4
commit 9e16c21454
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C
3 changed files with 7 additions and 3 deletions

View file

@ -16,7 +16,9 @@ repositories {
}
dependencies {
implementation "com.github.adamheinrich:native-utils:master-SNAPSHOT"
implementation 'com.github.adamheinrich:native-utils:master-SNAPSHOT'
implementation 'org.slf4j:slf4j-api:2.0.9'
implementation 'ch.qos.logback:logback-classic:1.4.6'
}
// Configure Gradle IntelliJ Plugin

View file

@ -20,6 +20,7 @@ public class CodeMP {
} catch(IOException e) {
throw new RuntimeException(e);
} finally {
LOGGER.info("Loaded CodeMP library!");
loadedLibrary = false;
}
}

View file

@ -41,6 +41,7 @@ public class BufferAttachAction extends AnAction {
ApplicationManager.getApplication().runWriteAction(() -> {
CodeMP.LOGGER.debug("Received text change {} from offset {} to {}!\n",
event.getContent(), event.getStart(), event.getEnd());
CodeMP.LOGGER.info("is writable: {}", document.isWritable());
document.replaceString( //TODO this doesn't work
(int) event.getStart(),
(int) event.getEnd(),