Skip to content

Conversation

@absurdlylongusername
Copy link
Member

@absurdlylongusername absurdlylongusername commented Nov 16, 2025

Adds a logging API to the Extractor.
By default it logs nothing, and users of the extractor can use setLogger to define where logs are written.

Uses ConsoleLogger for all tests by default using JUnit 5 extensions

Added some initial logs to some places.

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

Related PR: #1325

Set ConsoleLogger globally for all tests
Add string formatting to logger
Add tests for logger formatting
@absurdlylongusername absurdlylongusername linked an issue Nov 20, 2025 that may be closed by this pull request
5 tasks
@TobiGr TobiGr added codequality Improvements to the codebase to improve the code quality tests Issues and PR related to unit tests meta Related to the project but not strictly to code labels Nov 28, 2025
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we should however add some documentation

  • to the ExtractorLogger class
  • on how to set the logger
  • somehwere on how to disable the JUnit logger extension

@@ -0,0 +1,193 @@
package org.schabi.newpipe.extractor.utils;

public final class ExtractorLogger {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few lines of class doc would be good to have here.

@absurdlylongusername absurdlylongusername removed the meta Related to the project but not strictly to code label Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codequality Improvements to the codebase to improve the code quality tests Issues and PR related to unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add initial logging framework to the extractor

2 participants