The various sorts of destinations produced by the CMS MessageLogger Service will perform appropriate formatting of the material streamed to compose messages. The .cfg file parameters and the user code sending the message can exert some degree of control over the formatting of messages destined for output files (or streams) or for log4cplus.
In the descriptions below, an item refers to one object streamed to the message. Thus in
LogInfo ("category") "My Object number" << i << "is" << myObject;there are four items.
LogInfo ("mycategory") "My Object number" << i << "is" << myObject;it is likely that the user would prefer to see
%MSG-i mycategory: My Object number 125 is (32,100,102)rather than
%MSG-i mycategory: My Object number125is(32,100,102)However, sometimes the desired output is meant to have two items "running together." For example, the user may desire to display two numbers, separated by a slash, with no intervening spaces. Typically, the user concerned about this has a message prepared which explicitly contains any inter-item spaces desired.
When the logger encounters any item which ends in a space, it will assume that the user has prepared the message with all desired spaces, and will stop inserting any automatic spaces for the remainder of that message.
For example:
char[] root = "myroot"; char[] branch="mybranch"; char[] leaf="myleaf"
LogInfo ("category") "Location is " << root << "/" << branch << "/" leaf;
%MSG-i category: Location is myroot/mybranch/leafrather than
%MSG-i category: Location is myroot / mybranch / leafNote that linebreaks (potentially inserted between items unless disabled for that destination) still apply. -- SudhirMalik - 30-Aug-2011