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: log swift queue name #83

Open
mman opened this issue Nov 7, 2022 · 3 comments
Open

feature: log swift queue name #83

mman opened this issue Nov 7, 2022 · 3 comments

Comments

@mman
Copy link

mman commented Nov 7, 2022

In an app using multiple dispatch queues it may be worth logging current queue with every message.

Would you be willing to accept a PR if I consider adding this support? I am using HeliumLogger in multiple server side swift projects and would be willing to open a PR.

thanks for great and simple component...

@dannys42
Copy link
Contributor

dannys42 commented Nov 7, 2022

Thanks for asking about this. Just curious how you plan to get the current queue? According to this thread, it doesn't seem like there's a good way to do this.

@mman
Copy link
Author

mman commented Nov 7, 2022

        print(String(cString: __dispatch_queue_get_label(nil)))

from here: https://developer.apple.com/forums/thread/701313

@mman
Copy link
Author

mman commented Nov 16, 2022

Just to keep you updated. I have prototyped this including passing tests in my repo fork here: mman@8f1e1ef and it works great on macOS, but I was not able to make it compile under Linux. The hidden symbol __dispatch_queue_get_label does not exist under Linux. Still investigating.

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