[mythtv] [PATCH] VERBOSE flushing

Nigel Pearson nigel at ind.tansu.com.au
Fri Apr 1 04:24:07 UTC 2005


	Commit of mythcontext.h that got me thinking:
----------------------------
revision 1.190
date: 2005-03-31 23:57:02 +0000;  author: bjm;  state: Exp;  lines: +1 
-1
Reverting the flush behavior of the VERBOSE macro. Log messages need
to be flushed at the time problems occur and unflushed messages should
not be lost when a process dies or is killed.

Other methods should be used to limit specific excessive warning 
messages
as the author of the patch now suggessts.
----------------------------



	While I agree that log messages should be written to disk
when they occur, and excessive messages are bad, I also think
that reducing the use of endl has merit.

	Wondering if we should be both reducing fluching,
_and_ ensuring timely logging, by doing something like this:

% cvs diff -u libs/libmythtv/udpnotify.cpp
Index: libs/libmythtv/udpnotify.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/udpnotify.cpp,v
retrieving revision 1.5
diff -u -r1.5 udpnotify.cpp
--- libs/libmythtv/udpnotify.cpp        3 Feb 2005 04:17:50 -0000       
1.5
+++ libs/libmythtv/udpnotify.cpp        1 Apr 2005 04:21:41 -0000
@@ -315,8 +315,8 @@

      if (!doc.setContent(buf, false, &errorMsg, &errorLine, 
&errorColumn))
      {
-        cout << "Error parsing udpnotify xml: " << endl;
-        cout << "at line: " << errorLine << "  column: " << 
errorColumn << endl;
+        cout << "Error parsing udpnotify xml: \n";
+        cout << "at line: " << errorLine << "  column: " << 
errorColumn << "\n";
          cout << errorMsg << endl;
          return;
      }

--
Nigel Pearson, nigel at ind.tansu.com.au|  "Let's see how Spike is going"
Telstra BI&D, Sydney, Australia      |              ...
Office: 8255 4222    Fax:  8255 3153 |"I'd like to keep Spike as my 
pet."
Mobile: 0408 664435  Home: 9792 6998 |        Illyria - Angel



More information about the mythtv-dev mailing list