mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-18 06:10:16 +00:00
Migrate logging to SLF4J
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.dfsek.terra.addons.yaml;
|
||||
|
||||
import com.dfsek.tectonic.yaml.YamlConfiguration;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.dfsek.terra.api.TerraPlugin;
|
||||
import com.dfsek.terra.api.addon.TerraAddon;
|
||||
@@ -16,6 +18,8 @@ import com.dfsek.terra.api.injection.annotations.Inject;
|
||||
@Version("1.0.0")
|
||||
@Author("Terra")
|
||||
public class YamlAddon extends TerraAddon {
|
||||
private static final Logger logger = LoggerFactory.getLogger(YamlAddon.class);
|
||||
|
||||
@Inject
|
||||
private TerraPlugin main;
|
||||
|
||||
@@ -25,7 +29,7 @@ public class YamlAddon extends TerraAddon {
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigurationDiscoveryEvent.class)
|
||||
.then(event -> event.getLoader().open("", ".yml").thenEntries(entries -> entries.forEach(entry -> {
|
||||
main.getDebugLogger().info("Discovered config " + entry.getKey());
|
||||
logger.info("Discovered config {}", entry.getKey());
|
||||
event.register(entry.getKey(), new YamlConfiguration(entry.getValue(), entry.getKey()));
|
||||
})))
|
||||
.failThrough();
|
||||
|
||||
Reference in New Issue
Block a user