Feature #3951

Provide the ability to select single-line MessageFacility messages

Added by Kurt Biery almost 8 years ago. Updated almost 8 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Duration: 24


I has been suggested that it would be nice to have MessageFacility messages appear in a single line on the console or in log files. I've talked with Qiming, and he feels that this would be a straightforward addition to the MessageFacility. This feature would only be available in the Console and File logging destinations. (Server wouldn't make sense since no one would be seeing messages sent to a central logging facility.)


#1 Updated by Kurt Biery almost 8 years ago

  • Due date changed from 06/28/2013 to 06/21/2013
  • Assignee set to Michael Wang

Looking at the online MessageFacility documentation (, I see mention of the noLineBreaks and lineLength configuration parameters. Do these give us the desired behavior?

#2 Updated by Michael Wang almost 8 years ago

I modified the lines in MessageLogger (private copy) that sets things up for logging to the console:

   ss << commonPSet()
      << "  destinations : { " 
      << "    console : { " 
      << "      type : \"cout\" threshold : \"DEBUG\" " 
      << "      noLineBreaks : true noTimeStamps : true" 
      << "    } " 
      << "  } " ;

I confirmed that changing "threshold" to "INFO", for instance, suppresses the debug messages from being logged to the console. I also confirmed that setting "noTimeStamps" to "true" suppresses the timestamp. A header line without the timestamps suppressed would look like:

Thu Jun 13 10:32:39 -0500 2013: %MSG-d EventBuilder::main:  eventbuilder 13-Jun-2013 10:32:39 CDT eventbuilder

One with timestamps suppressed looks instead like:

Fri Jun 14 10:54:21 -0500 2013: %MSG-d EventBuilder::main:  eventbuilder eventbuilder 

However, I find that setting "noLineBreaks" to "true" has no effect on the message body. After looking at the code and confirming with Qiming, I found that the header line starting with "%MSG-d" and the footer line "%MSG" cannot be suppressed through configuration parameters. "noLineBreaks" is only meant to affect the message body produced by the application that is bracketed by the header and footer lines. But, I also find that setting "noLineBreaks" to "true" or "false" in conjunction with setting the "lineValue" parameter has no visible effect on the message body. Currently, whatever the setting of "noLineBreaks", it does not appear like any line breaks are being inserted at all for the message body. I see lines for the message body that are way in excess of a default 80 character limit.

In summary, it is not possible to have the message header (%MSG-d ...) , body, and footer (%MSG) all appear on a single line using only messagefacility configuration parameters. The "noLineBreaks" parameter does not produce the desired behavior.

Also available in: Atom PDF