Results 1 to 7 of 7

Thread: QxtLogger Question

  1. #1
    Join Date
    Feb 2010
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default QxtLogger Question

    I have an application where I'm looking at using a event/debug logger and QxtLogger looks like a possibility.

    However, my problem is that in reviewing the documentation, I don't' see how to set the output file name for the log files. I'm probably missing the obvious, but I could use some help.

  2. #2
    Join Date
    Jul 2010
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: QxtLogger Question

    Please someone answer the above question.

    Also i have another doubt.If this QxtLogger is not part of standard Qt who takes the responsibility of installing its libraby so that any application uses this lib does not break in the device.

    Br,
    Kalinga

  3. #3
    Join Date
    Feb 2010
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QxtLogger Question

    Quote Originally Posted by kalinga_ray View Post
    Please someone answer the above question.

    Also i have another doubt.If this QxtLogger is not part of standard Qt who takes the responsibility of installing its libraby so that any application uses this lib does not break in the device.

    Br,
    Kalinga

    After having used the library now for a couple of months, I've found it very reliable and easy to use. To answer your questions
    1 - For installation issues, it is just a matter of copying qxt dll's.
    2 - As far as" break in device", it only uses only Qt functions. So it is basically as reliable as qt is.

    Tom

  4. #4
    Join Date
    Jul 2010
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: QxtLogger Question

    Thanks Tom,
    I have a small doubt.If every single application who uses QxtLogger will install qxt dll's would not it be a problem.
    Is it better idea to modify the source and create own dll for this purpose.
    And to answer your question in the first post
    you look at QxtAbstractFileLoggerEngine ( const QString & fileName, QIODevice::OpenMode mode )
    while creating the engine you can specify the log output file name.
    Anyway i guess you would have figured out as you have mentioned you are using it for couple of months.

    Thanks,
    Kalinga

  5. The following user says thank you to kalinga_ray for this useful post:

    photo_tom (7th July 2010)

  6. #5
    Join Date
    Feb 2010
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QxtLogger Question

    Thanks for reply. Actually, I currently have written 5 different logging engines. And I am using QxtAbstractFileLoggerEngine in 3 different custom overloads now.
    Once, you really start to understand how it works, it really is a very elegant design.

    While I cannot post our proprietary code here, there is one thing we did that has really made the logger very useful. However, I can describe it. What I did was create a series of macros names LOGWITHNAMESx() that would generate the call to the logger that would output both the name of the variable and it's contents. So LOGWITHNAMES2(foo,bar) would output in the log file
    --- foo=, <contents foo>, bar=, <contents bar> ---.
    This has helped with proven to be extremely helpful in troubleshoots.

    Tom

  7. #6
    Join Date
    Jul 2010
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Thumbs up Re: QxtLogger Question

    Thanks Tom for your quick reply.
    If i install a "qInstallMsgHandler" i can control over all debug output.
    what extra i can do using a engine, that i couldn't do using qInstallMsgHandler.

    please share your understanding about some of my below doubt if you have any idea.
    i) If multiple applications who use QxtLogger will install qxt dll's would not it be a problem.
    ii) Is it better idea to modify the source and create own dll for this purpose.
    iii) How many dll's qxt package creates and if its creating multiple dlls can i install the one corresponding to logging only.
    any idea whether its supporting Symbian s60 or future symbian.

    Thanks in advance.

  8. #7
    Join Date
    Feb 2010
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QxtLogger Question

    Actually, there isn't that much. Qxtlogger and QDebug are two different approaches to solving the same problem. The biggest difference is that the logger allows you to easily contol what levels of output you want outputted at run-time. If you use the QDebug, you have to implement the dynamic level control yourself.

    On balance, we've found Qxtlogger to be more flexible.

    Tom

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
  •  
Qt is a trademark of The Qt Company.