94 string err =
"Empty debug options";
97 string::size_type comma = 0;
98 comma = values.find(
',');
99 if (comma == string::npos) {
100 string err =
"Missing comma in debug options: " + values;
104 bool created =
false;
105 string s_strm = values.substr(0, comma);
106 if (s_strm ==
"cerr") {
109 else if (s_strm ==
"LOG") {
110 strm = BESLog::TheLog()->get_log_ostream();
113 strm =
new ofstream(s_strm.c_str(), ios::out);
114 if (strm && strm->fail()) {
117 string err =
"Unable to open the debug file: " + s_strm;
125 string::size_type new_comma = 0;
126 while ((new_comma = values.find(
',', comma + 1)) != string::npos) {
127 string flagName = values.substr(comma + 1, new_comma - comma - 1);
128 if (flagName[0] ==
'-') {
129 string newflag = flagName.substr(1, flagName.size() - 1);
137 string flagName = values.substr(comma + 1, values.size() - comma - 1);
138 if (flagName[0] ==
'-') {
139 string newflag = flagName.substr(1, flagName.size() - 1);