File indexing completed on 2024-04-06 12:12:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include "FWCore/MessageService/src/MessageLoggerDefaults.h"
0024
0025 #include <iostream>
0026
0027 namespace edm {
0028 namespace service {
0029
0030 edm::JobMode MessageLoggerDefaults::mode(std::string const& jm) {
0031 if (jm.empty())
0032 return GridJobMode;
0033 if (jm == "grid")
0034 return GridJobMode;
0035 if (jm == "infos")
0036 return ReleaseValidationJobMode;
0037 if (jm == "analysis")
0038 return AnalysisJobMode;
0039 if (jm == "nil")
0040 return NilJobMode;
0041 std::cerr << "Unrecognized Job Mode Option: " << jm << " -- defaulting to analysis mode ";
0042 return AnalysisJobMode;
0043 }
0044
0045 void MessageLoggerDefaults::hardwireGridJobMode() {
0046
0047 destinations.push_back("cerr");
0048 categories.push_back("FwkReport");
0049 categories.push_back("FwkSummary");
0050 categories.push_back("Root_NoDictionary");
0051 statistics.push_back("cerr_stats");
0052
0053
0054
0055 {
0056 Destination cerr;
0057 cerr.threshold = "INFO";
0058 Category INFO_limits;
0059 INFO_limits.limit = 0;
0060 cerr.sev["INFO"] = INFO_limits;
0061 Category default_for_dest;
0062 default_for_dest.limit = 10000000;
0063 cerr.category["default"] = default_for_dest;
0064 Category FwkReport;
0065 FwkReport.limit = 10000000;
0066 FwkReport.reportEvery = 1;
0067 cerr.category["FwkReport"] = FwkReport;
0068 Category FwkSummary;
0069 FwkSummary.limit = 10000000;
0070 FwkSummary.reportEvery = 1;
0071 cerr.category["FwkSummary"] = FwkSummary;
0072 Category Root_NoDictionary;
0073 Root_NoDictionary.limit = 0;
0074 cerr.category["Root_NoDictionary"] = Root_NoDictionary;
0075 destination["cerr"] = cerr;
0076 }
0077 {
0078 Destination cerr_stats;
0079 cerr_stats.threshold = "WARNING";
0080 cerr_stats.output = "cerr";
0081 destination["cerr_stats"] = cerr_stats;
0082 }
0083
0084 }
0085
0086 void MessageLoggerDefaults::hardwireReleaseValidationJobMode() {
0087
0088 destinations.push_back("cerr");
0089 categories.push_back("FwkReport");
0090 categories.push_back("FwkSummary");
0091 categories.push_back("Root_NoDictionary");
0092 statistics.push_back("cerr_stats");
0093
0094
0095
0096 {
0097 Destination cerr;
0098 cerr.threshold = "INFO";
0099 Category INFO_limits;
0100 INFO_limits.limit = 5;
0101 cerr.sev["INFO"] = INFO_limits;
0102 Category default_for_dest;
0103 default_for_dest.limit = 10000000;
0104 cerr.category["default"] = default_for_dest;
0105 Category FwkReport;
0106 FwkReport.limit = 10000000;
0107 FwkReport.reportEvery = 1;
0108 cerr.category["FwkReport"] = FwkReport;
0109 Category FwkSummary;
0110 FwkSummary.limit = 10000000;
0111 FwkSummary.reportEvery = 1;
0112 cerr.category["FwkSummary"] = FwkSummary;
0113 Category Root_NoDictionary;
0114 Root_NoDictionary.limit = 0;
0115 cerr.category["Root_NoDictionary"] = Root_NoDictionary;
0116 destination["cerr"] = cerr;
0117 }
0118 {
0119 Destination cerr_stats;
0120 cerr_stats.threshold = "INFO";
0121 cerr_stats.output = "cerr";
0122 destination["cerr_stats"] = cerr_stats;
0123 }
0124
0125 }
0126
0127 void MessageLoggerDefaults::hardwireAnalysisJobMode() {
0128
0129 destinations.push_back("warnings");
0130 categories.push_back("FwkReport");
0131 categories.push_back("FwkSummary");
0132 categories.push_back("Root_NoDictionary");
0133 statistics.push_back("cerr");
0134
0135
0136
0137 {
0138 Destination warnings;
0139 warnings.threshold = "INFO";
0140 Category INFO_limits;
0141 INFO_limits.limit = 0;
0142 warnings.sev["INFO"] = INFO_limits;
0143 Category default_for_dest;
0144 default_for_dest.limit = 1000;
0145 warnings.category["default"] = default_for_dest;
0146 Category FwkReport;
0147 FwkReport.limit = 10000000;
0148 FwkReport.reportEvery = 100;
0149 warnings.category["FwkReport"] = FwkReport;
0150 Category FwkSummary;
0151 FwkSummary.limit = 10000000;
0152 warnings.category["FwkSummary"] = FwkSummary;
0153 Category Root_NoDictionary;
0154 Root_NoDictionary.limit = 0;
0155 warnings.category["Root_NoDictionary"] = Root_NoDictionary;
0156 destination["warnings"] = warnings;
0157 }
0158 {
0159 Destination cerr;
0160 cerr.threshold = "INFO";
0161 destination["cerr"] = cerr;
0162 }
0163 }
0164
0165 void MessageLoggerDefaults::hardwireNilJobMode() {
0166
0167 }
0168
0169 }
0170 }