Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Custom logger added with option to attach handler #522

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

anees17861
Copy link
Contributor

Added a static class MeshLogger.
This class accepts a LogHandler object providable by app.
If the LogHandler is null then it falls back to android.util.Log print statement.

closes #521

@CLAassistant
Copy link

CLAassistant commented Jun 22, 2022

CLA assistant check
All committers have signed the CLA.

@anees17861
Copy link
Contributor Author

Hi @roshanrajaratnam,

Any update on reviewing this?
I understand that the number of files to review is huge but just to make your life easier, I'll provide the summary of actions that I did:

Created MeshLogger file

Find and replaced all instances within the mesh module of the following
import android.util.Log; with import no.nordicsemi.android.mesh.logger.MeshLogger;
Log.v with MeshLogger.verbose
Log.d with MeshLogger.debug
Log.i with MeshLogger.info
Log.w with MeshLogger.warn
Log.e with MeshLogger.error

The only issue is if some other feature gets added with logs before this PR is merged, then the PR will need to be updated to accommodate those changes. I have unfortunately not found a way around this

@roshanrajaratnam
Copy link
Member

Hi, thanks for your contribution and we really appreciate it. I have been a bit busy with some other stuff, I will get this merged today :)

@roshanrajaratnam roshanrajaratnam merged commit d2292fa into NordicSemiconductor:main Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide option to process Nrf library logs
3 participants