D22143: Add proper logging using ECMQtDeclareLoggingCategory

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Thu Jul 25 20:56:43 BST 2019


kossebau added a comment.


  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.
  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.
  
  > I don't think this is an important issue.
  > 
  > For what it is worth, the same technique is used in other repos :
  
  IMHO all cases which are bad code :)
  
  > This does not justify it but makes the points that other KDE devs did not see an issue with it.
  
  All us KDE devs have different backgrounds, so not surprising there are different opinions :)
  
  > I would gladly use an alternative if presented with one.
  
  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.
  Or extend the documentation of the macro, to specify the cpp name. Then its part of the API contract officially :)

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/20190725/c0b7c7e8/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list