[Live-devel] Suggestion to improve logging inside live555

stephan depoorter stephan.depoorter at codecompetence.com
Wed Jan 4 01:12:53 PST 2012


Hi,

I've been using Live555 and I like it. Despite things are starting to run
smooth, I have a suggestion to improve the logging
in the library, this will be usefull when tracking difficult problems that
happen rarely.

Using the current codebase, I implemented logging using a
BasicUsageEnvironment derived class,
and so I received some logging from the library classes as well. However,
live555 is also sending usefull info to stderr,
and to catch that as well, one also has to redirect stderr. These
statements do not contain time info, and are only triggered in
debug builds.

For example in RTSPServer.cpp :

#ifdef DEBUG
  fprintf(stderr, "parseRTSPRequestString() failed\n");
#endif


#ifdef DEBUG
  envir() << "accept()ed connection from " <<
our_inet_ntoa(clientAddr.sin_addr) << "\n";
#endif

So my suggestion is to :

- Do all logging in the same way (through the environment class)
- Always add timestamps
- Add levels of logging (verbose, info, error )
- Always log, not only in debug builds, the specific environment class can
decide what to do with it
- For conveniance, provide a basiclogger that does the writing to the
logfile(s)

Regards,
Steph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120104/49bb8802/attachment.html>


More information about the live-devel mailing list