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 vstring destinations = {"detailedInfo.txt", ... } parameter establishes one or more file (or ostream) destinations for the messages issued. The destinations can be configured individually to establish filtering of messages. Since this is a vstring parameter, the names of the destinations are separated by commas.
In this case, we have specified four files (perhaps overkill in ordinary circumstances, but we wished to use the four illustrate various configuration options). We have also specified both cerr and cout; if this is done, it is recommended that cout be re-directed to a file, otherwise the message contents will be inter-mixed with those sent to cerr.
If messages are issued prior to the initiation of the MessageLogger service, the configuration of these destinations will not yet have occurred. Such messages will be sent to cerr alone.