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

Log tag issue in coroutine blocks #12

Open
jackvt93 opened this issue Oct 31, 2021 · 1 comment
Open

Log tag issue in coroutine blocks #12

jackvt93 opened this issue Oct 31, 2021 · 1 comment

Comments

@jackvt93
Copy link

I call a logcat function with default parameters in my kotlin coroutine block like viewModelScope.launch {}, but the tag name seems get from the nested class not from the root class (Eg. StandaloneCoroutine: xxxx). Should we make the tag name more generally or something just like Timber is doing?

@muthuraj57
Copy link

I wrote something similar to this library for our internal use and I also faced the same issue. I solved it by just calling the logcat function with the root class's scope like this this@MyViewModel.logCat { "my log" }.

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

No branches or pull requests

2 participants