[libbluray-devel] Add toString() for logging
hpi1
git at videolan.org
Fri Feb 27 11:50:44 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Feb 27 11:32:56 2015 +0200| [04ff3a6b9ea0aa1c7fc33f2f84e51c61d464a4ef] | committer: hpi1
Add toString() for logging
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=04ff3a6b9ea0aa1c7fc33f2f84e51c61d464a4ef
---
src/libbluray/bdj/java/org/videolan/BDJListeners.java | 4 ++++
src/libbluray/bdj/java/org/videolan/BDJXletContext.java | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/src/libbluray/bdj/java/org/videolan/BDJListeners.java b/src/libbluray/bdj/java/org/videolan/BDJListeners.java
index eda3ed0..244cbbe 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJListeners.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJListeners.java
@@ -128,6 +128,10 @@ public class BDJListeners {
this.listener = listener;
}
+ public String toString() {
+ return this.getClass().getName() + "[event=" + event + ", listener=" + listener;
+ }
+
protected void doAction() {
if (event instanceof PlaybackMarkEvent) {
((PlaybackListener)listener).markReached((PlaybackMarkEvent)event);
diff --git a/src/libbluray/bdj/java/org/videolan/BDJXletContext.java b/src/libbluray/bdj/java/org/videolan/BDJXletContext.java
index b76c8cc..06a9ed4 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJXletContext.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJXletContext.java
@@ -179,6 +179,12 @@ public class BDJXletContext implements javax.tv.xlet.XletContext, javax.microedi
return threadGroup;
}
+ public String toString() {
+ BDJThreadGroup localGroup = threadGroup;
+ String groupName = localGroup == null ? "<destroyed>" : localGroup.getName();
+ return super.toString() + "[name=" + groupName + ", released=" + released + "]";
+ }
+
/*
* Event queues
*/
More information about the libbluray-devel
mailing list