CMS MessageLogger: Establishing Limits and Timespans

Establishing Limits and Timespans

process TEST = {

  service = MessageLogger {
    vstring destinations = { "detailedInfo.txt"
			   , "critical.txt"
			   , "jobdebug.txt"
			   , "anotherfile.txt"
			   , "cout"
			   , "cerr"
			   }
    vstring categories = { "unimportant"
			 , "trkwarning"
 			 , "serious_matter"
                         }
    PSet critical.txt = { string threshold = "ERROR"
                               PSet default = { int32 limit    = 10
			                        int32 timespan = 180
					      }
			      PSet serious_matter = { int32 limit = 100000 }
                        }
    PSet detailedInfo.txt = { string threshold = "INFO"
			      PSet default        = { int32 limit    =  10
					              int32 timespan =  60
					            }
			      PSet WARNING        = { int32 limit    = 100
			                              int32 timespan =  60 
					            }
			      PSet ERROR          = { int32 limit    = 100
			                              int32 timespan =  60 
					            }
			      PSet trkwarning     = { int32 limit    = 20
			                              int32 timespan = 1200
						    }
			      PSet unimportant    = { int32 limit    = 5 }
			      PSet serious_matter = { int32 limit    = 1000000 }
                            }
    PSet cerr     = { string threshold = "WARNING" }

    PSet jobdebug.txt =     { PSet default        = { int32 limit    = 1000000 }
                            }
    PSet anotherfile.txt =  { PSet serious_matter = { int32 limit    = 1000 } 
                            }
    PSet default = { int32 limit    = 10
                     int32 timespan = 60
		   }
  }
  untracked PSet maxEvents = {untracked int32 input = 10}
  path p = { myAnalysisModule }
  module myAnalysisModule = ModuleThatIssuesMessages { }
  source = EmptySource { }
}
The Pset entries int32 limit = ... and int32 timespan = ... establish that this destination should report only so many messages of a specified specified messageID or severity level. For example, detailedInfo.txt will report only the first twenty trkwarning messages, before ignoring most of the rest (with an exponential backoff).

The timespan, if supplied, directs the destination to reset its count of how many times a message of this type has been encountered if no messages of this type occur within that many seconds. For example, if this job issues 25 trkwarning messages at the start, then 25 additional messages more than 20 minutes (1200 seconds) later, the first twenty of each group would be reported. A limit can be supplied without a timespan. Supplying a timespan without a limit is meaningless.

These are optional. Each destination can supply limit and timespan for all, some, or none of severity levels, listed message IDs, and default (all message IDs without explicit specification). Note that if both the limit and the timespan are specified, they are not comma-separated (since they are two distinct elements in a PSet).

USCMS Software and Computing Home Page - CMS MessageLogger Service Page - Configuration File


Mark Fischler
Last modified: Dec 1, 2005