D22143: Add proper logging using ECMQtDeclareLoggingCategory
Méven Car
noreply at phabricator.kde.org
Fri Jul 26 07:59:14 BST 2019
meven added a comment.
In D22143#502336 <https://phabricator.kde.org/D22143#502336>, @kossebau wrote:
> In D22143#502314 <https://phabricator.kde.org/D22143#502314>, @meven wrote:
>
> > > Relying on undocumented names of generated sources files does not get my +1. That needs someone else to take responsibility :)
> >
> > Well this kind of file generation is common and is indirectly documented through the ecm_qt_declare_logging_category macro.
>
>
> The current implementation of the macro is an internal detail. It is not part of the API contract.
I am quoting the macro documentation :
> A header file, <filename>, will be generated along with a corresponding source file, ...
https://api.kde.org/ecm/module/ECMQtDeclareLoggingCategory.html
So here, It seems to me this generated cpp file is part of the macro documented behavior.
> Binding one's code to current internal implementation has two disadvantages: it makes it harder for the macro developers to enhance the macro, because they would break your code, Or they do not know someone is relying on internal details, and your code breaks one day.
Fair point, in general, not relying on internal details
> I just tried to give one in my previous comment: regenerating the respective logging source files in the autotest dir again, by calling the macro there once more.
I might do just do that, thanks.
REPOSITORY
R159 KActivities Statistics
REVISION DETAIL
https://phabricator.kde.org/D22143
To: meven, ivan, #frameworks, kossebau
Cc: kossebau, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190726/aa0265ec/attachment.html>
More information about the Kde-frameworks-devel
mailing list