Results 1 to 7 of 7

Thread: Logger Library : advice and help needed.

  1. #1
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    2

    Default Logger Library : advice and help needed.

    Hello,

    I hope I'm posting in the right thread - forgive me if it's not the case.

    I'm using Qt on WinXP with MinGW 3.4.5 / QT 4.2.3, and I am currently looking for a 'logger' library (ideally I would like to find one as "log4j" in the Java world, but I'm interested in others, too).

    I saw many references to C++ libraries, but :
    - I could not determine with one was the best to use
    - ... and honestly I could not compile them properly on my configuration... (without knowing if I was doing something wrong, of if there was no compatibility with MinGW or my environment).

    So my questions are : do any of you use a logger library under WinXP / MinGW ?
    Could you provide me help with this ?

    Thanks in advance for your help and patience.

  2. #2
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Logger Library : advice and help needed.

    Hello Antoine,

    I don't really know a logging library...
    Well, it's not really difficult to write a Logger module on your own : Qt provides all the good components to achieve that...
    For instance, QTextStream, QFile to dump your log lines.
    This code would be portable.

    The only thing that you really have to implement is the log rotation & log packing into archive (if you need them).

    I think there was already another thread about that, I'm looking for it !

    By the way, I did a small logging class in my application, so I can help ;-)

    Guilugi.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Logger Library : advice and help needed.

    I've been using log4cpp (http://log4cpp.sourceforge.net/) or log4cxx (http://directory.fsf.org/log4cpp.html) - I don't remember which of them right now.

  4. #4
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    2

    Default Re: Logger Library : advice and help needed.

    Thank you very much for your answers !

    Guilugi : did you find the thread you were talking about ? I didn't !
    Qt allows me to define a message handler to manage calls to "qDebug" or "qWarning" : is that what you mentioned ?
    I could use that, but I don't have time to implement a logger class now, and I wanted to manage the logs behaviour from the outside of the app, and with a notion of "levels"...

    Wysota : were these two libraries compiled without any problem on WinXP / MinGW 3.4.5 / Qt 4.2.3 ?
    Are they portable, too ?

    Thanks for your help and answers !

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Logger Library : advice and help needed.

    They are portable.

  6. The following user says thank you to wysota for this useful post:

    Antoine (6th April 2007)

  7. #6
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Logger Library : advice and help needed.

    Oops, sorry Antoine, here's the link to the thread.

    http://www.qtcentre.org/forum/f-qt-p...ht=QTextStream

    It was meant for Qt3, but it may help

    Guilugi.

  8. The following user says thank you to guilugi for this useful post:

    Antoine (6th April 2007)

  9. #7
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    2

    Default Re: Logger Library : advice and help needed.

    Thanks for your help and answers !
    This will help me a lot !

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.