Skip to content

Allow app to turn off printing errors to logcat #4665

@noamtamim

Description

@noamtamim

Issue description

When there are playback errors, ExoPlayer sends them to logcat in addition to reporting via listeners:

    // Snippet from ExoPlayerImplInternal
    } catch (ExoPlaybackException e) {
      Log.e(TAG, "Playback error.", e);
      stopInternal(/* reset= */ false, /* acknowledgeStop= */ false);
      eventHandler.obtainMessage(MSG_ERROR, e).sendToTarget();
      maybeNotifyPlaybackInfoChanged();
    } catch (IOException e) {
      Log.e(TAG, "Source error.", e);
      stopInternal(/* reset= */ false, /* acknowledgeStop= */ false);
      eventHandler.obtainMessage(MSG_ERROR, ExoPlaybackException.createForSource(e)).sendToTarget();
      maybeNotifyPlaybackInfoChanged();
    } catch (RuntimeException e) {
      Log.e(TAG, "Internal runtime error.", e);
      stopInternal(/* reset= */ false, /* acknowledgeStop= */ false);
      eventHandler.obtainMessage(MSG_ERROR, ExoPlaybackException.createForUnexpected(e))
          .sendToTarget();
      maybeNotifyPlaybackInfoChanged();

I believe the player should not print to logcat. The app listens to onPlayerError() and it can decide to log these errors according to its own logic.

Version of ExoPlayer being used

2.8.3

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions