PeerConnection.java: enable setting trace & log levels from Java

Replaces the hard-coded scheme that was there before and lets apps decide what
to log and to where.

R=wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1969004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4498 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fischman@webrtc.org
2013-08-06 19:00:53 +00:00
parent c4e1ab515b
commit c883fdc273
5 changed files with 109 additions and 9 deletions

View File

@@ -44,6 +44,7 @@ import org.json.JSONException;
import org.json.JSONObject;
import org.webrtc.DataChannel;
import org.webrtc.IceCandidate;
import org.webrtc.Logging;
import org.webrtc.MediaConstraints;
import org.webrtc.MediaStream;
import org.webrtc.PeerConnection;
@@ -58,6 +59,7 @@ import org.webrtc.VideoRenderer.I420Frame;
import org.webrtc.VideoSource;
import org.webrtc.VideoTrack;
import java.util.EnumSet;
import java.util.LinkedList;
import java.util.List;
@@ -98,6 +100,12 @@ public class AppRTCDemoActivity extends Activity
}
});
// Uncomment to get ALL WebRTC tracing and SENSITIVE libjingle logging.
// Logging.enableTracing(
// "/sdcard/trace.txt",
// EnumSet.of(Logging.TraceLevel.TRACE_ALL),
// Logging.Severity.LS_SENSITIVE);
PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
wakeLock = powerManager.newWakeLock(
PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AppRTCDemo");