Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:47

0001 #include "FWCore/MessageService/test/MessageLoggerClient.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 #include "FWCore/Framework/interface/MakerMacros.h"
0004 
0005 #include <iostream>
0006 
0007 namespace edmtest {
0008 
0009   void MessageLoggerClient::analyze(edm::StreamID,
0010                                     edm::Event const& /*unused*/
0011                                     ,
0012                                     edm::EventSetup const& /*unused*/
0013   ) const {
0014     //std::cout << "Module reached\n";
0015     LogDebug("aTestMessage") << "LogDebug was used to send this message";
0016     edm::LogInfo("aTestMessage") << "LogInfo was used to send this message";
0017     edm::LogWarning("aTestMessage") << "LogWarning was used to send this message";
0018     edm::LogError("aTestMessage") << "LogError was used to send this message";
0019     edm::LogInfo("cat1|cat2||cat3") << "Three-category message";
0020 
0021     edm::LogWarning("aboutToSend") << "about to send 100 warnings";
0022     for (unsigned i = 0; i != 100; ++i) {
0023       edm::LogWarning("unimportant") << "warning number " << i;
0024     }
0025 
0026   }  // MessageLoggerClient::analyze()
0027 
0028 }  // namespace edmtest
0029 
0030 using edmtest::MessageLoggerClient;
0031 DEFINE_FWK_MODULE(MessageLoggerClient);