Results 1 to 1 of 1

Thread: VS2012, Qt5.4 and qtlogging.ini

  1. #1
    Join Date
    Jan 2006
    Location
    Third rock from the sun
    Posts
    106
    Thanks
    17
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question VS2012, Qt5.4 and qtlogging.ini

    I am trying to setup the qtlogging.ini file to setup the categorization rules in Qt. My application (Qt 5.4 and VS2012) is using various categories in the qcDebug|qcWarning etc messages and compiled in Debug mode. I created a qtlogging.ini files and put it into my application directory path\QtProject\qtlogging.ini with the following rules
    Qt Code:
    1. [Rules]
    2. *.debug=true
    3. pcwb.*=false
    4. logger.*=true
    To copy to clipboard, switch view to plain text mode 

    I have two test debug messages
    Qt Code:
    1. // Inside the .cpp file, but outside a function
    2. Q_LOGGING_CATEGORY( pcwbMain, "pcwb.main" )
    3. Q_LOGGING_CATEGORY( pcwbMainGui, "pcwb.main.gui" )
    4. Q_LOGGING_CATEGORY( pcwbMainTest, "pcwb.main.test" )
    5.  
    6. // Inside the class constructor
    7. qCDebug( pcwbMainGui, "Gui Test" );
    8. qCDebug( pcwbMainTest, "PCWB Test Message" );
    To copy to clipboard, switch view to plain text mode 

    I expect the pcwb categories to not print out, but both still do. Is there something I am missing with the whole QLoggingCategory setup? I feel like it is not finding the ini file at all despite the QStandardPaths::GenericConfigLocations returned include the directory containing the QtProject directory.

    UPDATE 1: Explicitly setting the QT_LOGGING_CONF environment variable works, but I would prefer to have the logging.ini file in the application directory and always loaded from the same place.
    Last edited by Rayven; 7th April 2017 at 20:20. Reason: Added Additional Info
    Every little child knows
    if you cant see dreams
    your eyes are blind

    Moxy Fruvous

Similar Threads

  1. VS add-in will not install in VS2012
    By astodolski in forum Qt Tools
    Replies: 3
    Last Post: 24th May 2017, 07:36
  2. Replies: 3
    Last Post: 4th October 2016, 00:18
  3. Vs2012/13?
    By qtoptus in forum Qt Tools
    Replies: 1
    Last Post: 2nd April 2014, 09:02
  4. Compile QFtp in QT5.2.1 use vs2012
    By river in forum Qt Programming
    Replies: 0
    Last Post: 3rd March 2014, 13:22
  5. Building Qt5.2 for VS2012 not working
    By Carlsberg in forum Installation and Deployment
    Replies: 1
    Last Post: 15th December 2013, 10:01

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.