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

Using inline for loggin functions with lambda #131

Open
Omasyo opened this issue Nov 14, 2024 · 0 comments
Open

Using inline for loggin functions with lambda #131

Omasyo opened this issue Nov 14, 2024 · 0 comments

Comments

@Omasyo
Copy link

Omasyo commented Nov 14, 2024

suspend fun bar(): String {
    return "A String"
}

suspend fun foo() {
    Napier.d { bar() }
}

The above code doesn't work because the lambda function isn't a suspend function.

I understand we can just use the non-lambda equivalent, but it'll be convenient if we can also call colored functions in the lamba like we do outside of it

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

1 participant