I'm using Bukkits PluginLogger to log messages (but also tried everything of the things written below with Bukkit.getLogger() and getServer().getLogger()). My goal is to change the log level of the logger to Level.FINE. Things I tried: Setting the log level programmatically by calling logger.setLevel(Level.FINE) Setting the log level programmatically (same code as in point 1) for the PluginLogger, which is returned by getLogger() and all it's parent loggers and their handlers. Creating a custom logging.properties file and using it with java -Djava.util.logging.config.file="logging.properties" -jar spigot-1.16.4.jar with the below pasted content. At this approach I was not sure about the handler names but I came up with the ForwardLogHandler name by printing all handlers to the console this was the name of the handler of the root logger. I took the TerminalConsoleHandler name from this thread. Unfortunately none of the approaches worked, so any help would be highly appreciated - thank you. PS: I know, that I could create a custom file handler, but I don't want to log to a custom file, I just want to look at the default logs in more detail. Code: ############################################################ # Global properties ############################################################ .level = ALL ############################################################ # Handler specific properties. # Describes specific configuration info for Handlers. ############################################################ org.bukkit.craftbukkit.util.ForwardLogHandler.level = ALL org.bukkit.craftbukkit.v1_16_R3.util.ForwardLogHandler.level = ALL org.bukkit.craftbukkit.util.TerminalConsoleHandler.level = ALL org.bukkit.craftbukkit.v1_16_R3.util.TerminalConsoleHandler.level = ALL ############################################################ # Facility specific properties. # Provides extra control for each logger. ############################################################ # Default Bukkit logger Minecraft.level = ALL # RegionForSale Minecraft.BukkitPlugin.level = ALL
Because I want to be able to use all log levels in my plugin. Why fo they exist if I can't use them @timtower?
Ok - thank you @timtower. Then I'll try to add my own Handler to get all logs. Should I post the solution here if others find this thread and have the same problem?
@ksick Don't think that many people need so much logging to be honest. But you are always free to do so.
I just summarized all my learnings about logging here: https://ksick.dev/a-guide-to-minecraft-plugin-development-with-bukkit-part-1/#logging