0
This repository has been archived on 2022-04-04. You can view files and clone it, but cannot push or open issues or pull requests.
TheE c88eab84a8 Only use ColorMapper if jAnsi is present, ignore it if not
This change allows slf4bukkit to run on Bukkit implementations without jansi by making ColorMapper an interface. Instances are created by using a ColorMappingFactory: If the Bukkit implementation bundles jAnsi, an AnsiColorMapper is returned that maps ChatColors to their ansi equivalents; if the Bukkit implementation does not bundle jAnsi, a NotSupportedColorMapper is returned that returns strings as is.
2017-07-31 16:43:19 +02:00
2016-03-28 00:12:57 -04:00
2016-03-28 00:12:57 -04:00
2017-07-30 21:59:15 -04:00
2017-07-30 23:07:12 -04:00
2017-07-30 21:49:01 -04:00
2016-03-28 00:12:57 -04:00
2017-07-30 23:08:22 -04:00
2017-07-30 23:01:24 -04:00
2017-07-30 22:14:41 -04:00

SLF4Bukkit

SLF4Bukkit is an SLF4J binding that uses Bukkit's plugin logging system.

Server Administrators

If you were linked here by documentation for a plugin that you're using on your Bukkit/Spigot server, go here to learn what configuration options you have available (and please ask the plugin developer to fix their links!).

Plugin Developers

If you wish to use SLF4J in your Bukkit plugin, or if your plugin has a dependency on a library that uses SLF4J:

<dependency>
  <groupId>info.ronjenkins</groupId>
  <artifactId>slf4bukkit</artifactId>
  <version>0.1.5</version>
</dependency>
  • (Optional) Add your desired default configuration values to your plugin's built-in config.yml file. For more details, see the Javadocs for the BukkitLoggerAdapter class.
  • (Optional) Use the SLF4J API in your code.
    • SLF4Bukkit supports only ColorMarkers, which format the entire message and associated throwable (if any). All other markers are discarded. ColorMarkers always override the default level-specific formatting defined in the plugin config.
    • In addition to using ColorMarkers, you can use Bukkit's ChatColor values to further format your message.
    • SLF4Bukkit issues ChatColor.RESET after every log message, so you don't have to worry about resetting after each message.
    • You can use the ColorString class to easily create colored log messages.
Description
SLF4Bukkit is an SLF4J binding that uses Bukkit's plugin logging system.
Readme 793 KiB
Languages
Java 99.3%
Shell 0.7%