[Qt-interest] Logging to files
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Wed May 12 17:20:49 CEST 2010
Srdjan Todorovic wrote on Wednesday, May 12, 2010 4:19 PM:
>> ...
>> I need to write to log files in my server application.
>> ...
> You do know that Qt has file I/O support, right?
Logging usually involves more than just "writing debug statements to some file": it involves setting a "Log Level" ("Debug", "Warning", "Error", "Info" etc.), logging transparently into a file, a console, a database, maybe logging "over the network" etc., adding "Log Filters", automatically adding time stamps, formatting the time stamps/log messages, specifying the log output format ("Plain text", "XML", "HTML", ...), configure the logging with configuration files (or other means) etc. etc.
There is a reason why non-trivial frameworks such as "log4j" exist (http://logging.apache.org/log4j/1.2/index.html
So the question whether there is some Qt based solution was justified, I think. And answers have already been given (and naturally there exists also a "log4c": http://log4c.sourceforge.net/, but I do not have any experience with that).
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list