Paste #123495: test

Date: 2024/06/06 06:56:03 UTC-07:00
Type: Java

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


            System.out.println(Files.readString(Path.of(plugin.getDataFolder().getPath(), "config/logging.json")));

            // load config
            var configFile = new File(plugin.getDataFolder(), "config/logging.json");
            try (
                    var configResource = new FileInputStream(configFile)
            ) {
                var configReader = new InputStreamReader(configResource);
                this.config = gson.fromJson(configReader, FPLoggerConfig.class);
                configReader.close();

                this.info("Initialized FPLogger with level {0}.", this.config.getLogLevel().name());
            } catch (FileNotFoundException ex) {
                this.warning("Couldn't load logging.json (doesn't exist). Using fallback configuration.");
            } catch (JsonParseException | IOException ex) {
                this.warning("Couldn't load logging.json (read error). Using fallback configuration.");
            }

            System.out.println(this.config.isClearSpigotLogs());

Highlighting for 'Other' types handled by Highlight.JS, which was released under the BSD 3-Clause License.