251 lines
9.6 KiB
HTML
251 lines
9.6 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
| Generated by Apache Maven Doxia at 2017-07-31
|
|
| Rendered using Apache Maven Fluido Skin 1.4
|
|
-->
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="Date-Revision-yyyymmdd" content="20170731" />
|
|
<meta http-equiv="Content-Language" content="en" />
|
|
<title>SLF4Bukkit – SLF4Bukkit for Plugin Developers</title>
|
|
<link rel="stylesheet" href="./css/apache-maven-fluido-1.4.min.css" />
|
|
<link rel="stylesheet" href="./css/site.css" />
|
|
<link rel="stylesheet" href="./css/print.css" media="print" />
|
|
|
|
|
|
|
|
<style type="text/css">body{background-image: url('./images/profiles/pre-release.png');}</style>
|
|
|
|
|
|
<script type="text/javascript" src="./js/apache-maven-fluido-1.4.min.js"></script>
|
|
|
|
|
|
</head>
|
|
<body class="topBarEnabled">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://github.com/rjenkinsjr/slf4bukkit">
|
|
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
|
|
src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"
|
|
alt="Fork me on GitHub">
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="topbar" class="navbar navbar-fixed-top ">
|
|
<div class="navbar-inner">
|
|
<div class="container-fluid">
|
|
<a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</a>
|
|
|
|
<ul class="nav">
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">User Guide <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
|
|
<li> <a href="index.html" title="For Server Administrators">For Server Administrators</a>
|
|
</li>
|
|
|
|
<li> <a href="devs.html" title="For Plugin Developers">For Plugin Developers</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Documentation <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
|
|
<li class="dropdown-submenu">
|
|
<a href="project-info.html" title="Project Information">Project Information</a>
|
|
<ul class="dropdown-menu">
|
|
<li> <a href="dependencies.html" title="Dependencies">Dependencies</a>
|
|
</li>
|
|
<li> <a href="dependency-convergence.html" title="Dependency Convergence">Dependency Convergence</a>
|
|
</li>
|
|
<li> <a href="plugins.html" title="Project Plugins">Project Plugins</a>
|
|
</li>
|
|
<li> <a href="source-repository.html" title="Source Repository">Source Repository</a>
|
|
</li>
|
|
<li> <a href="project-summary.html" title="Project Summary">Project Summary</a>
|
|
</li>
|
|
<li> <a href="license.html" title="Project License">Project License</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown-submenu">
|
|
<a href="project-reports.html" title="Project Reports">Project Reports</a>
|
|
<ul class="dropdown-menu">
|
|
<li> <a href="apidocs/index.html" title="JavaDocs">JavaDocs</a>
|
|
</li>
|
|
<li> <a href="xref/index.html" title="Source Xref">Source Xref</a>
|
|
</li>
|
|
<li> <a href="taglist.html" title="Tag List">Tag List</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container-fluid">
|
|
<div id="banner">
|
|
<div class="pull-left">
|
|
<div id="bannerLeft">
|
|
<h2>SLF4Bukkit</h2>
|
|
</div>
|
|
</div>
|
|
<div class="pull-right"> </div>
|
|
<div class="clear"><hr/></div>
|
|
</div>
|
|
|
|
<div id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
|
|
|
|
<li id="publishDate">Last Published: 2017-07-31
|
|
<span class="divider">|</span>
|
|
</li>
|
|
<li id="projectVersion">Version: 0.1.6
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div class="row-fluid">
|
|
<div id="leftColumn" class="span2">
|
|
<div class="well sidebar-nav">
|
|
|
|
|
|
<ul class="nav nav-list">
|
|
<li class="nav-header">User Guide</li>
|
|
|
|
<li>
|
|
|
|
<a href="index.html" title="For Server Administrators">
|
|
<span class="none"></span>
|
|
For Server Administrators</a>
|
|
</li>
|
|
|
|
<li class="active">
|
|
|
|
<a href="#"><span class="none"></span>For Plugin Developers</a>
|
|
</li>
|
|
<li class="nav-header">Project Documentation</li>
|
|
|
|
<li>
|
|
|
|
<a href="project-info.html" title="Project Information">
|
|
<span class="icon-chevron-right"></span>
|
|
Project Information</a>
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="project-reports.html" title="Project Reports">
|
|
<span class="icon-chevron-right"></span>
|
|
Project Reports</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
<div id="poweredBy">
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<div class="clear"></div>
|
|
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
|
|
<img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="bodyColumn" class="span10" >
|
|
|
|
<div class="section">
|
|
<h2><a name="SLF4Bukkit_for_Plugin_Developers"></a>SLF4Bukkit for Plugin Developers</h2>
|
|
<p>If you wish to use <a class="externalLink" href="http://slf4j.org">SLF4J</a> in your Bukkit plugin, or if your plugin has a dependency on a library that uses SLF4J:</p>
|
|
|
|
<ul>
|
|
|
|
<li>Reference the <a class="externalLink" href="https://github.com/rjenkinsjr/maven2">rjenkinsjr Maven2 Repository</a> in your POM.</li>
|
|
|
|
<li><a class="externalLink" href="https://maven.apache.org/plugins/maven-shade-plugin/usage.html">Shade</a> SLF4Bukkit into your plugin project:</li>
|
|
</ul>
|
|
|
|
<div class="source">
|
|
<div class="source"><pre class="prettyprint linenums"><dependency>
|
|
<groupId>info.ronjenkins</groupId>
|
|
<artifactId>slf4bukkit</artifactId>
|
|
<version>0.1.6</version>
|
|
</dependency>
|
|
</pre></div></div>
|
|
|
|
<ul>
|
|
|
|
<li>(Optional) Add your desired default configuration values to your plugin’s built-in <a href="index.html">config.yml</a> file. For more details, see the Javadocs for the <a href="apidocs/org/slf4j/impl/BukkitLoggerAdapter.html">BukkitLoggerAdapter</a> class.</li>
|
|
|
|
<li>(Optional) Use the <a class="externalLink" href="http://www.slf4j.org/api/org/slf4j/Logger.html">SLF4J API</a> in your code.
|
|
|
|
<ul>
|
|
|
|
<li>SLF4Bukkit supports only <a href="apidocs/info/ronjenkins/slf4bukkit/ColorMarker.html">ColorMarkers</a>, 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.</li>
|
|
|
|
<li>In addition to using ColorMarkers, you can use Bukkit’s <tt>ChatColor</tt> values to further format your message.</li>
|
|
|
|
<li>SLF4Bukkit issues <tt>ChatColor.RESET</tt> after every log message, so you don’t have to worry about resetting after each message.</li>
|
|
|
|
<li>You can use the <a href="apidocs/info/ronjenkins/slf4bukkit/ColorString.html">ColorString</a> class to easily create colored log messages.</li>
|
|
|
|
<li>For a consistent user experience, it’s recommended that you perform all logging via SLF4Bukkit and not use <tt>Plugin.getLogger()</tt>.</li>
|
|
</ul></li>
|
|
</ul></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<footer>
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<p class="pull-right">Copyright © 2017.
|
|
All rights reserved.
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|