Repository: incubator-gearpump
Updated Branches:
  refs/heads/master b79fb2445 -> 55d6d2f56


[GEARPUMP-345] Add getLogger(Class <?>) implementation for Java

Author: Buddhi Ayesha <[email protected]>

Closes #224 from buddhiayesha2015/master.


Project: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-gearpump/commit/55d6d2f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/tree/55d6d2f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gearpump/diff/55d6d2f5

Branch: refs/heads/master
Commit: 55d6d2f5660af7b52668cfdfcdd4d92fc76f67a3
Parents: b79fb24
Author: Buddhi Ayesha <[email protected]>
Authored: Wed Sep 6 18:51:55 2017 +0800
Committer: manuzhang <[email protected]>
Committed: Wed Sep 6 18:52:05 2017 +0800

----------------------------------------------------------------------
 core/src/main/scala/org/apache/gearpump/util/LogUtil.scala | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gearpump/blob/55d6d2f5/core/src/main/scala/org/apache/gearpump/util/LogUtil.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/gearpump/util/LogUtil.scala 
b/core/src/main/scala/org/apache/gearpump/util/LogUtil.scala
index 98850a8..d38b61b 100644
--- a/core/src/main/scala/org/apache/gearpump/util/LogUtil.scala
+++ b/core/src/main/scala/org/apache/gearpump/util/LogUtil.scala
@@ -67,6 +67,11 @@ object LogUtil {
     }
   }
 
+  /** getLogger(Class) implementation for Java */
+  def getLogger[T](clazz: Class[T]): Logger = {
+    LoggerFactory.getLogger(clazz.getSimpleName)
+  }
+
   /** Custom the log file locations by reading config from system properties */
   def loadConfiguration(config: Config, processType: ProcessType.ProcessType): 
Unit = {
     // Set log file name

Reply via email to