Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Issue 1335103004: Log to the webrtc log stream from webrtc/modules java code. (Closed)

Created:
5 years, 3 months ago by jiayl2
Modified:
5 years, 2 months ago
CC:
webrtc-reviews_webrtc.org, yujie_mao (webrtc), Andrew MacDonald, tterriberry_mozilla.com, qiang.lu, niklas.enbom
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Log to the webrtc log stream from webrtc/modules java code. The purpose is to gather all webrtc logging in a single place and allow the app to redirect all webrtc logging to a single stream for offline debugging. Moved Logging.java to webrtc/base to be shared by talk/ and modules/. R=glaznev@webrtc.org, henrika@webrtc.org, magjed@webrtc.org, tommi@webrtc.org Committed: https://crrev.com/7754285f7c2651c564a48de978c41b141ecfcb02 Cr-Commit-Position: refs/heads/master@{#9959}

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : #

Total comments: 6

Patch Set 4 : CR #

Patch Set 5 : sync #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -215 lines) Patch
M talk/app/webrtc/java/src/org/webrtc/Logging.java View 1 1 chunk +0 lines, -137 lines 0 comments Download
M talk/libjingle.gyp View 1 2 3 4 4 chunks +7 lines, -4 lines 0 comments Download
A + webrtc/base/java/src/org/webrtc/Logging.java View 1 2 3 2 chunks +15 lines, -27 lines 1 comment Download
M webrtc/build/apk_tests.gyp View 1 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java View 1 2 chunks +4 lines, -3 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java View 1 2 chunks +4 lines, -3 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java View 1 2 chunks +4 lines, -3 lines 0 comments Download
M webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java View 1 2 chunks +3 lines, -2 lines 0 comments Download
M webrtc/modules/modules_java.gyp View 1 3 chunks +4 lines, -0 lines 0 comments Download
M webrtc/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java View 1 12 chunks +17 lines, -16 lines 0 comments Download
M webrtc/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java View 1 4 chunks +6 lines, -5 lines 0 comments Download
M webrtc/modules/video_render/android/java/src/org/webrtc/videoengine/ViEAndroidGLES20.java View 1 5 chunks +8 lines, -7 lines 0 comments Download
M webrtc/modules/video_render/android/java/src/org/webrtc/videoengine/ViESurfaceRenderer.java View 1 6 chunks +9 lines, -8 lines 0 comments Download

Messages

Total messages: 31 (9 generated)
jiayl2
PTAL
5 years, 3 months ago (2015-09-14 23:26:23 UTC) #2
henrika_webrtc
+henrikg since he knows the logging parts in WebRTC well.
5 years, 3 months ago (2015-09-15 08:22:57 UTC) #4
Henrik Grunell WebRTC
What is the problem with using the existing org.webrtc.Logging?
5 years, 3 months ago (2015-09-15 08:27:17 UTC) #5
henrika_webrtc
Sorry for delaying one round but could you give a short summary of what the ...
5 years, 3 months ago (2015-09-15 08:33:47 UTC) #6
henrika_webrtc
LGTM
5 years, 3 months ago (2015-09-15 15:26:16 UTC) #7
AlexG
May be move Logging.java to a separate package - something like org.webrtc.logging.Logging.java to avoid code ...
5 years, 3 months ago (2015-09-15 16:41:35 UTC) #8
jiayl2
On 2015/09/15 16:41:35, AlexG wrote: > May be move Logging.java to a separate package - ...
5 years, 3 months ago (2015-09-15 17:30:09 UTC) #9
jiayl2
Adding tommi. PTAL
5 years, 3 months ago (2015-09-15 17:30:51 UTC) #11
AlexG
lgtm
5 years, 3 months ago (2015-09-15 17:55:02 UTC) #14
jiayl2
On 2015/09/15 08:33:47, henrika_webrtc wrote: > Sorry for delaying one round but could you give ...
5 years, 3 months ago (2015-09-15 17:58:45 UTC) #15
Henrik Grunell WebRTC
https://codereview.webrtc.org/1335103004/diff/80001/talk/libjingle.gyp File talk/libjingle.gyp (right): https://codereview.webrtc.org/1335103004/diff/80001/talk/libjingle.gyp#newcode141 talk/libjingle.gyp:141: # TODO(fischman): extract this into a webrtc gyp var ...
5 years, 3 months ago (2015-09-16 07:19:59 UTC) #16
Henrik Grunell WebRTC
Nit: add bug or remove BUG=.
5 years, 3 months ago (2015-09-16 07:21:26 UTC) #17
tommi
Magnus, since you're an owner I'm assuming I'm not needed (can't review just now either)
5 years, 3 months ago (2015-09-16 08:21:24 UTC) #18
jiayl2
Magnus, PTAL
5 years, 3 months ago (2015-09-16 17:20:11 UTC) #20
jiayl2
All comments addressed. https://codereview.webrtc.org/1335103004/diff/80001/talk/libjingle.gyp File talk/libjingle.gyp (right): https://codereview.webrtc.org/1335103004/diff/80001/talk/libjingle.gyp#newcode141 talk/libjingle.gyp:141: # TODO(fischman): extract this into a ...
5 years, 3 months ago (2015-09-16 17:26:04 UTC) #21
magjed_webrtc
I'm not an owner of any of these files, but it lgtm :) I'm owner ...
5 years, 3 months ago (2015-09-16 18:06:30 UTC) #22
tommi
Sorry, I thought only the video files remained, but lgtm all the same.
5 years, 3 months ago (2015-09-16 18:32:23 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1335103004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1335103004/120001
5 years, 3 months ago (2015-09-16 21:57:12 UTC) #26
jiayl2
Committed patchset #5 (id:120001) manually as 7754285f7c2651c564a48de978c41b141ecfcb02 (presubmit successful).
5 years, 3 months ago (2015-09-16 23:20:53 UTC) #27
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/7754285f7c2651c564a48de978c41b141ecfcb02 Cr-Commit-Position: refs/heads/master@{#9959}
5 years, 3 months ago (2015-09-16 23:20:58 UTC) #28
Henrik Grunell WebRTC
lgtm
5 years, 3 months ago (2015-09-17 07:04:39 UTC) #29
phoglund
5 years, 2 months ago (2015-09-28 13:03:34 UTC) #31
Message was sent while issue was closed.
https://codereview.webrtc.org/1335103004/diff/120001/webrtc/base/java/src/org...
File webrtc/base/java/src/org/webrtc/Logging.java (right):

https://codereview.webrtc.org/1335103004/diff/120001/webrtc/base/java/src/org...
webrtc/base/java/src/org/webrtc/Logging.java:22: } catch (Throwable t) {
Umm, no. No no no no. Don't do this.

First, you should never ever catch Throwable. I suspect what you want to really
do here is to catch UnsatisfiedLinkError. Throwable includes OutOfMemoryError,
ClassNotFoundError and a lot of other stuff you don't want to catch.

Second, you need to do at better job of falling back. I just spent an hour
wondering why nativeEnableLogThreads wasn't linked in, but the problem was
actually that the .so didn't load. Only, this code hid that fact. 

I see you made some improvements to this code recently, but enableLogThreads
will still blow up with a confusing error if the so doesn't load. At the very
least you need to do something in enableLogThreads (like assert that the so load
succeeded, and if it didn't, say something like "you're trying to use
enableLogThreads but the .so didn't load!"). That would separate "the .so didn't
load" from "enableLogThreads is not defined".

What are you trying to support with this catch? What valid use case is there if
libjingle isn't around?

Powered by Google App Engine
This is Rietveld 408576698