[Live-devel] Logging usage

Jim Ham jimham at porcine.com
Mon Nov 23 15:56:57 PST 2020


I'm using live555MediaServer. I need to know which files are being 
served, so I added a very simple logging function.

diff -r live/liveMedia/RTSPServer.cpp live.new/liveMedia/RTSPServer.cpp
1319a1320,1329
 >       // simple logging added by jeh 11/23/2020
 >       FILE* logfid = fopen("live555.log", "a" ) ;
 >       if (logfid != NULL) {
 >       time_t tm = time(NULL) ;
 >       char * tmstr = ctime(&tm ) ;
 >       fwrite( streamName, 1, strlen(streamName), logfid ) ;
 >       fwrite (", ",1,2,logfid) ;
 >       fwrite( tmstr, 1, strlen(tmstr), logfid ) ;
 >       fclose( logfid ) ;
 >       }

I'm not sure if this is the best place, or even if it's a good idea, but 
it seems to work.

Jim Ham
-- 
Porcine Associates LLC
244 O'Connor St.
Menlo Park, CA 94025
USA
+1(650)326-2669 fax +1(650)326-1071


More information about the live-devel mailing list