Permalink
Browse files

Add global logger for Java internals (forward to Scala global logger)

  • Loading branch information...
1 parent 759c84f commit 83282007a26c1cc8b2ee61bba75a885ef096eab5 @pvlugter pvlugter committed Mar 12, 2014
@@ -110,7 +110,7 @@ public void onConnected() {
try {
callback.invoke(this);
} catch (Throwable e) {
- play.Logger.of("play").error("Exception in Comet.onConnected", e);
+ play.PlayInternal.logger().error("Exception in Comet.onConnected", e);
}
}
}
@@ -131,7 +131,7 @@ public void onConnected() {
try {
callback.invoke(this);
} catch (Throwable e) {
- play.Logger.of("play").error("Exception in EventSource.onConnected", e);
+ play.PlayInternal.logger().error("Exception in EventSource.onConnected", e);
}
}
}
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
+ */
+package play;
+
+/**
+ * Play internal global API.
+ */
+public class PlayInternal {
+ /*
+ * Global logger for Play internals.
+ */
+ public static org.slf4j.Logger logger() {
+ return play.api.Play$.MODULE$.logger().underlyingLogger();
+ }
+}
@@ -1107,7 +1107,7 @@ public void invoke() throws Throwable {
try {
callback.invoke();
} catch(Throwable e) {
- play.Logger.of("play").error("Exception is Chunks disconnected callback", e);
+ play.PlayInternal.logger().error("Exception is Chunks disconnected callback", e);
}
}
}
@@ -97,7 +97,7 @@ public void onReady(In<A> in, Out<A> out) {
try {
callback.invoke(in, out);
} catch (Throwable e) {
- play.Logger.of("play").error("Exception in WebSocket.onReady", e);
+ play.PlayInternal.logger().error("Exception in WebSocket.onReady", e);
}
}
}

0 comments on commit 8328200

Please sign in to comment.