-
Notifications
You must be signed in to change notification settings - Fork 52
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
[Cleanup/Debug Logs] Use Q_FUNC_INFO in many more places. #337
Conversation
Thanks! ... could you use Q_FUNC_INFO instead of strings ... i generally do this nowadays :) |
Good point, I'll do some more of those. |
setConnectionState will do it. Before this, the log would print triple reports like this: 2024-01-25 19:18:14.895 : AbstractDevice::onPropertiesChanged: "org.bluez.Device1" QMap(("Connected", QVariant(bool, false))) () 2024-01-25 19:18:14.901 : DisConnected! 2024-01-25 19:18:14.901 : void AbstractDevice::setConnectionState(const QString&) "disconnected" 2024-01-25 19:18:14.901 : DeviceInterface::onConnectionStateChanged "disconnected"
... also adapt brace style
Well, went all over the place with these. Hope this is acceptable. |
In general, I like that change and I like having function name in the log. However, there is a generic way to do that. harbour-amazfish/daemon/src/harbour-amazfish-daemon.cpp Lines 25 to 30 in d5e3fe6
I am using that in few projects, for example: It have some pitfalls, e.g. QT_MESSAGELOGCONTEXT define and some compiler flag must be used, otherwise filename and line is removed. |
I'm not sure I understand right. Is this a request to switch all I could do that of course, but I wouldn't be comfortable doing that without approval from the original code authors/maintainers. |
Its not request, it maybe suggestion or opening of discussion. As I said previously, I am more less fine with keeping it same as you made it. |
Ill accept this for now ... ive used the myMessageHandler approach in the past, and maybe something to do as a next step? |
Make debug info and include guard match source file/function names