diff --git a/README.md b/README.md new file mode 100644 index 0000000..c972ed5 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ + +SLF4Bukkit +=== +SLF4J binding that uses Bukkit's plugin logging system. +--- +### Server Owners +If you were linked here by documentation for a plugin that you're using on your Bukkit/Spigot server, [go here](http://rjenkinsjr.github.io/slf4bukkit) 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](http://slf4j.org) in your Bukkit plugin, or if your plugin has a dependency on a library that uses SLF4J: + ++ [Shade](https://maven.apache.org/plugins/maven-shade-plugin/usage.html) SLF4Bukkit into your plugin project: + +```xml + + info.ronjenkins + slf4bukkit + 0.1.0-SNAPSHOT + +``` + ++ (Optional) Add your desired default configuration values to your plugin's built-in [config.yml](http://rjenkinsjr.github.io/slf4bukkit) file. ++ (Optional) Use the [SLF4J API](http://www.slf4j.org/api/org/slf4j/Logger.html) in your code. Note that SLF4Bukkit does not support markers. + +For more details, see the Javadocs for the [BukkitPluginLoggerAdapter](http://rjenkinsjr.github.io/slf4bukkit/apidocs/org/slf4j/impl/BukkitPluginLoggerAdapter.html) class. diff --git a/pom.xml b/pom.xml index 32c04b9..8f40cc3 100644 --- a/pom.xml +++ b/pom.xml @@ -23,12 +23,18 @@ 0.1.0-SNAPSHOT SLF4Bukkit SLF4J binding that uses Bukkit's plugin logging system. + http://rjenkinsjr.github.io/slf4bukkit UTF-8 1.7 1.7 + 2.10.3 ${maven.compiler.source} true + ${project.basedir}/src/site + ${project.basedir}/target/site-src + pre-release + ${project.basedir}/src/github @{project.version} @@ -45,16 +51,15 @@ - - org.bukkit - bukkit - 1.9-R0.1-SNAPSHOT - provided - org.slf4j slf4j-api 1.7.19 + + + org.bukkit + bukkit + 1.9-R0.1-SNAPSHOT provided @@ -72,7 +77,155 @@ + + + maven-resources-plugin + 2.7 + + + + copy-site-resources + pre-site + + copy-resources + + + ${site.dest} + + + ${site.src} + true + + + + + + + + + maven-site-plugin + 3.4 + + + ${site.dest} + + true + + + + + maven-antrun-plugin + 1.8 + + + + preprocess-site-velocity-templates + pre-site + + run + + + + + + + + + + + + + + + + + + + maven-project-info-reports-plugin + 2.8.1 + + false + + + + + issue-tracking + mailing-list + project-team + dependencies + dependency-management + dependency-convergence + plugins + scm + cim + distribution-management + summary + license + + + + + + + maven-javadoc-plugin + ${maven.javadoc.version} + + + + javadoc + + + + + + + maven-jxr-plugin + 2.5 + + + + jxr + + + + + + + org.codehaus.mojo + taglist-maven-plugin + 2.4 + + + + + To-dos + + + TODO + ignoreCase + + + FIXME + ignoreCase + + + + + Deprecations + + + @deprecated + ignoreCase + + + + + + + + + @@ -111,6 +264,7 @@ + clean deploy site-deploy @@ -133,6 +287,52 @@ + + maven-resources-plugin + + + + generate-github-readme + site + + copy-resources + + + ${project.basedir} + + + ${github.site.dir} + + README.md + + true + + + true + + + + + + + com.github.github + site-maven-plugin + 0.12 + + + push-site-to-github + site-deploy + + site + + + github + Publishing site for version ${project.version} + true + + + + diff --git a/src/github/README.md b/src/github/README.md new file mode 100644 index 0000000..2b623d8 --- /dev/null +++ b/src/github/README.md @@ -0,0 +1,40 @@ + +${project.name} +=== +${project.description} +--- +### Server Owners +If you were linked here by documentation for a plugin that you're using on your Bukkit/Spigot server, [go here](${project.url}) 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](http://slf4j.org) in your Bukkit plugin, or if your plugin has a dependency on a library that uses SLF4J: + ++ [Shade](https://maven.apache.org/plugins/maven-shade-plugin/usage.html) SLF4Bukkit into your plugin project: + +```xml + + ${project.groupId} + ${project.artifactId} + ${project.version} + +``` + ++ (Optional) Add your desired default configuration values to your plugin's built-in [config.yml](${project.url}) file. ++ (Optional) Use the [SLF4J API](http://www.slf4j.org/api/org/slf4j/Logger.html) in your code. Note that SLF4Bukkit does not support markers. + +For more details, see the Javadocs for the [BukkitPluginLoggerAdapter](${project.url}/apidocs/org/slf4j/impl/BukkitPluginLoggerAdapter.html) class. diff --git a/src/main/java/org/slf4j/impl/StaticMDCBinder.java b/src/main/java/org/slf4j/impl/StaticMDCBinder.java index 4f65aa3..f8e397a 100644 --- a/src/main/java/org/slf4j/impl/StaticMDCBinder.java +++ b/src/main/java/org/slf4j/impl/StaticMDCBinder.java @@ -58,6 +58,8 @@ public class StaticMDCBinder { /** * Currently this method always returns an instance of {@link BasicMDCAdapter} * . + * + * @return never null. */ public MDCAdapter getMDCA() { // note that this method is invoked only from within the static initializer diff --git a/src/site/markdown/devs.md b/src/site/markdown/devs.md new file mode 100644 index 0000000..5d7965a --- /dev/null +++ b/src/site/markdown/devs.md @@ -0,0 +1,39 @@ +## Copyright (C) 2016 Ronald Jack Jenkins Jr. +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +#set($h1 = '#') +#set($h2 = '##') +#set($h3 = '###') +#set($h4 = '####') +#set($h5 = '#####') +#set($h6 = '######') +${project.name} for Plugin Developers +--- + +If you wish to use [SLF4J](http://slf4j.org) in your Bukkit plugin, or if your plugin has a dependency on a library that uses SLF4J: + ++ [Shade](https://maven.apache.org/plugins/maven-shade-plugin/usage.html) SLF4Bukkit into your plugin project: + +```xml + + ${project.groupId} + ${project.artifactId} + ${project.version} + +``` + ++ (Optional) Add your desired default configuration values to your plugin's built-in [config.yml](home.html) file. ++ (Optional) Use the [SLF4J API](http://www.slf4j.org/api/org/slf4j/Logger.html) in your code. Note that SLF4Bukkit does not support markers. + +For more details, see the Javadocs for the [BukkitPluginLoggerAdapter](apidocs/org/slf4j/impl/BukkitPluginLoggerAdapter.html) class. diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md new file mode 100644 index 0000000..96d7e4b --- /dev/null +++ b/src/site/markdown/index.md @@ -0,0 +1,78 @@ +## Copyright (C) 2016 Ronald Jack Jenkins Jr. +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +#set($h1 = '#') +#set($h2 = '##') +#set($h3 = '###') +#set($h4 = '####') +#set($h5 = '#####') +#set($h6 = '######') +${project.name} for Server Administrators +--- + +If you were linked here by documentation for a plugin that you're using on your Bukkit/Spigot server, you can control the logging behavior of the plugin using its `config.yml` file. + +Basic documentation of all available options is shown below. Your plugin likely has additional information regarding what portions of the plugin's logging facilities are configurable. + +```yaml +# This is the section within which all SLF4Bukkit configuration options is +# contained. Its name is the same regardless of what the plugin's name is. +slf4j: + + # Default log level for all plugin logging activity. Possible values are + # "trace", "debug", "info", "warn", or "error". + # + # If the plugin logs any "trace" or "debug" messages, they will be logged by + # the plugin as "info" severity, but you'll see the actual severity in the + # log message. This is due to a Bukkit logging limitation. + # + # If not specified, default is "info". + defaultLogLevel: info + + # Shows an "[SLF4J]" header for every message logged through SLF4Bukkit. + # + # If not specified, default is "false". + showHeader: false + + # Shows the name of each thread that is logging via SLF4Bukkit. You probably + # don't want this information unless you're helping troubleshoot a plugin. + # + # If not specified, default is "false". + showThreadName: false + + # Shows the full logger name (e.g. "info.ronjenkins.bukkit.MyPlugin"). + # + # If not specified, default is "false". + showLogName: false + + # Shows the short logger name, which is the short Java package name format + # (e.g. a logger named "info.ronjenkins.bukkit.MyPlugin" would have a short + # name of "i.r.b.MyPlugin". + # + # If not specified, default is "true". + showShortLogName: true + + # This section controls logging levels for individual loggers. + log: + + # For each element in this section, the key is the full logger name and the + # value is the logging level for that logger. Possible logging levels are + # the same as what's available for the "slf4j.defaultLogLevel" property. + # + # The documentation for your plugin should elaborate on what logger names + # are available. As a general rule, you won't need to specify levels for + # specific loggers. + info.ronjenkins.bukkit.MyPlugin: debug + info.ronjenkins.SomeOtherLogger: warn +``` diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 0000000..f08b282 --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,47 @@ + + + + + org.apache.maven.skins + maven-fluido-skin + 1.4 + + + + true + true + true + pull-right + + rjenkinsjr/slf4bukkit + right + black + + ${site.profile} + + + + + + + + + +