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

[Feature Request] It's will be nice if there is a possiblity to have the named of the function where the debug is call #59

Closed
yelkamel opened this issue Oct 29, 2022 · 1 comment

Comments

@yelkamel
Copy link

Hello, when I saw you doc.
I see that:

[D] UI Loggy - DoSomeWork: This is debug message

I told to myself wow wonderfull we can see the named of the function.
But in fact, it was the named of the class.

So I look in the internet if it's possible to do that.
https://stackoverflow.com/questions/49966808/how-to-get-the-name-of-the-current-and-calling-function-in-dart

It's look very complicated.

So I just post that feature request maybe it's easy for you.

Nice package by the way !

@lukaknezic
Copy link
Contributor

Hi @yelkamel

This is actually already implemented, it's not enabled by default since it is more expensive operation to execute in the code.

You can just set includeCallerInfo: true, in your LogOptions and you will get something like:

⚠️ 13:58:28.235324 WARNING  UI Loggy - ExampleUiLoggy (example/loggy_example.dart 53:11) This is log from UI logger

This still won't give you function name but you will have line number and file name so you can find 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

2 participants