You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2016/12/26 19:29:28 UTC
logging-log4j2 git commit: Add Scala example for Logger.apply()
Repository: logging-log4j2
Updated Branches:
refs/heads/master d003404af -> b17b3722e
Add Scala example for Logger.apply()
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b17b3722
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b17b3722
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b17b3722
Branch: refs/heads/master
Commit: b17b3722e8c82e6db1b3e3b4e95f3549f7800064
Parents: d003404
Author: Matt Sicker <bo...@gmail.com>
Authored: Mon Dec 26 13:29:21 2016 -0600
Committer: Matt Sicker <bo...@gmail.com>
Committed: Mon Dec 26 13:29:21 2016 -0600
----------------------------------------------------------------------
src/site/xdoc/manual/scala-api.xml | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b17b3722/src/site/xdoc/manual/scala-api.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/scala-api.xml b/src/site/xdoc/manual/scala-api.xml
index b207468..8c9d0ea 100644
--- a/src/site/xdoc/manual/scala-api.xml
+++ b/src/site/xdoc/manual/scala-api.xml
@@ -43,11 +43,15 @@
<h4>Example</h4>
<pre class="prettyprint linenums">
import org.apache.logging.log4j.scala.Logging
+import org.apache.logging.log4j.Level
class MyClass extends BaseClass with Logging {
def doStuff(): Unit = {
logger.info("Doing stuff")
}
+ def doStuffWithLevel(level: Level): Unit = {
+ logger(level, "Doing stuff with arbitrary level")
+ }
}
</pre>
<p>