-
Notifications
You must be signed in to change notification settings - Fork 80
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
Passing FileName and LineNumber #57
Comments
Hi @nsinklier, This is certainly something we've been experimenting with as well and have decided to place it on top of Willow itself for now. If we wanted to do this directly in Willow, we'd probably want to support Given the scope of this change, I'm not sure it's something you'd actually like to take on yourself since it would be a MAJOR version change. It's certainly something that we've been noodling on for a while. Thoughts? |
Hey @cnoon, thanks for the quick response! I definitely agree that it should be attached to every I was thinking that since I'm going to make these changes anyway, I could just send you the code to look at. Then, if you think it would be beneficial we could incorporate it, otherwise I'll just keep it for myself. I've only spent about an hour and it's almost done, so I don't think the change will be too time consuming, it's just a lot of lines of code changed. |
I personally think that the position belongs to a log message. Without the position, log messages are only half as valuable. That's why I implemented this feature request and opened a pull request. |
Willow/Source/Logger.swift
Line 147 in 816ff01
I don't see a way to attach the file name and line number to the logs, which would be useful for errors especially. Is this something you've considered and discarded or just something you haven't needed? I'm going to add it to my project, if it's something you're interested in, I'd be happy to make a PR at add this. This is basically the code:
This would be especially helpful when creating a LogWriter to post logs to a server. That way you can determine error locations based on logs.
The text was updated successfully, but these errors were encountered: