File indexing completed on 2023-03-17 11:03:10
0001 #ifndef FWCore_MessageService_ELdestination_h
0002 #define FWCore_MessageService_ELdestination_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 #include "FWCore/MessageService/src/ELlimitsTable.h"
0032
0033 #include "FWCore/MessageLogger/interface/ErrorObj.h"
0034 #include "FWCore/MessageLogger/interface/ELextendedID.h"
0035
0036 #include <unordered_set>
0037 #include <string>
0038
0039 namespace edm {
0040 namespace service {
0041
0042
0043
0044
0045
0046 class ELadministrator;
0047
0048
0049
0050
0051
0052 class ELdestination {
0053 friend class ELadministrator;
0054
0055 public:
0056 ELdestination();
0057 ELdestination(const ELdestination& orig) = delete;
0058 ELdestination& operator=(const ELdestination& orig) = delete;
0059 virtual ~ELdestination();
0060
0061
0062
0063 public:
0064 virtual bool log(const edm::ErrorObj& msg);
0065
0066 virtual std::string getNewline() const;
0067
0068 virtual void finish();
0069
0070
0071
0072 void setThreshold(const messagelogger::ELseverityLevel& sv);
0073 void setTraceThreshold(const messagelogger::ELseverityLevel& sv);
0074 void setLimit(const std::string& s, int n);
0075 void setLimit(const messagelogger::ELseverityLevel& sv, int n);
0076 void setInterval(const std::string& s, int interval);
0077 void setInterval(const messagelogger::ELseverityLevel& sv, int interval);
0078 void setTimespan(const std::string& s, int n);
0079 void setTimespan(const messagelogger::ELseverityLevel& sv, int n);
0080
0081
0082
0083 virtual void suppressText();
0084 virtual void includeText();
0085 virtual void suppressModule();
0086 virtual void includeModule();
0087 virtual void suppressSubroutine();
0088 virtual void includeSubroutine();
0089 virtual void suppressTime();
0090 virtual void includeTime();
0091 virtual void suppressContext();
0092 virtual void includeContext();
0093 virtual void suppressSerial();
0094 virtual void includeSerial();
0095 virtual void useFullContext();
0096 virtual void useContext();
0097 virtual void separateTime();
0098 virtual void attachTime();
0099 virtual void separateEpilogue();
0100 virtual void attachEpilogue();
0101 virtual int setLineLength(int len);
0102 virtual int getLineLength() const;
0103
0104 virtual void wipe();
0105 virtual void zero();
0106 virtual void filterModule(std::string const& moduleName);
0107 virtual void excludeModule(std::string const& moduleName);
0108 virtual void ignoreModule(std::string const& moduleName);
0109 virtual void respondToModule(std::string const& moduleName);
0110 virtual bool thisShouldBeIgnored(std::string const& s) const;
0111
0112 virtual void setTableLimit(int n);
0113
0114 virtual void changeFile(std::ostream& os);
0115 virtual void changeFile(const std::string& filename);
0116 virtual void flush();
0117
0118 protected:
0119 messagelogger::ELseverityLevel threshold;
0120 messagelogger::ELseverityLevel traceThreshold;
0121 ELlimitsTable limits;
0122 std::string preamble;
0123 std::string newline;
0124 std::string indent;
0125 int lineLength;
0126 bool respondToMostModules;
0127 bool ignoreMostModules;
0128 std::unordered_set<std::string> respondToThese;
0129 std::unordered_set<std::string> ignoreThese;
0130
0131 #ifndef DEFECT_NO_STATIC_CONST_INIT
0132 static const int defaultLineLength = 80;
0133 #else
0134 static const int defaultLineLength;
0135 #endif
0136
0137
0138
0139 };
0140
0141 struct close_and_delete {
0142 void operator()(std::ostream* os) const;
0143 };
0144
0145 }
0146 }
0147
0148 #endif