Skip to content

Conversation

@alperozturk96
Copy link
Contributor

This PR adds interceptor to the clients.

Screenshot 2025-08-27 at 13 51 16 Screenshot 2025-08-27 at 13 51 36

Signed-off-by: alperozturk <[email protected]>

@Throws(IOException::class)
fun execute(method: OkHttpMethodBase): Int {
interceptor.interceptOkHttpMethodBaseRequest(method)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tobiasKaminsky

How can I completely bypass the interception process? Currently, LogOC not going to print anything in prod, but I would also like to skip the parsing step altogether. When I checked the isEnabled value in LogOC, it returned false during my local tests, even though it should be enabled.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
interceptor.interceptOkHttpMethodBaseRequest(method)
if (BuildConfig.DEBUG) {
interceptor.interceptOkHttpMethodBaseRequest(method)
}

Maybe something like that?

Copy link
Contributor Author

@alperozturk96 alperozturk96 Aug 28, 2025

Choose a reason for hiding this comment

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

In some cases (such as beta or QA versions), even in release mode, we want to track logs to detect issues.

Copy link
Member

Choose a reason for hiding this comment

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

Seems Log_OC inside libray is not started.
I will check it.

Copy link
Member

Choose a reason for hiding this comment

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

Idea: move files' logger to library logging

@github-actions
Copy link
Contributor

SpotBugs

CategoryBaseNew
Bad practice3434
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness1111
Performance88
Total168168

@github-actions
Copy link
Contributor

SpotBugs

CategoryBaseNew
Bad practice3434
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness1111
Performance88
Total168168

Signed-off-by: alperozturk <[email protected]>
@github-actions
Copy link
Contributor

SpotBugs

CategoryBaseNew
Bad practice3434
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness1111
Performance88
Total168168

@nextcloud-android-bot
Copy link
Collaborator

@nextcloud-android-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants