CMS MessageLogger Service:Adjusting Linebreak Policy

By default, output destinations (but not log4cplus or fwkJobReport destinations) are formatted by injecting line breaks between items if a line would exceed 80 characters. This formatting can be controlled and/or disabled:

process.MessageLogger = cms.Service("MessageLogger",
                                           destinations   = cms.untracked.vstring( 'detailedInfo','critical'),
                                           critical             = cms.untracked.PSet(
                                                                     noLineBreaks = cms.untracked.bool(true),
                                           detailedInfo   = cms.untracked.PSet(
                                                                    lineLength = cms.untracked.int32(132)

process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10))
process.myAnalysisModule = cms.EDAnalyzer('ModuleThatIssuesMessages')
process.p = cms.Path(process.myAnalysisModule)

The bool noLineBreaks = true parameter in the PSet configuring critical.txt tells the destination producing the file critical.txt not to add line breaks which would format the message for an 80-column screen. Files which will be parsed by automated utilities might be easier to handle without logger-produced line breaks within a message.

The int32 lineLength = 132 parameter in the PSet configuring detailedInfo.txt tells the destination producing the file detailedInfo.txt not format the message for a 132-column window.

-- SudhirMalik - 30-Aug-2011

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2012-05-13 - NitishDhingra
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback