100 if (values.empty()) {
101 string err =
"Empty debug options";
104 string::size_type comma = 0;
105 comma = values.find(
',');
106 if (comma == string::npos) {
107 string err =
"Missing comma in debug options: " + values;
111 bool created =
false;
112 string s_strm = values.substr(0, comma);
113 if (s_strm ==
"cerr") {
116 else if (s_strm ==
"LOG") {
117 strm = BESLog::TheLog()->get_log_ostream();
120 strm =
new ofstream(s_strm.c_str(), ios::out);
121 if (strm && strm->fail()) {
124 string err =
"Unable to open the debug file: " + s_strm;
132 string::size_type new_comma = 0;
133 while ((new_comma = values.find(
',', comma + 1)) != string::npos) {
134 string flagName = values.substr(comma + 1, new_comma - comma - 1);
135 if (flagName[0] ==
'-') {
136 string newflag = flagName.substr(1, flagName.length() - 1);
144 string flagName = values.substr(comma + 1, values.length() - comma - 1);
145 if (flagName[0] ==
'-') {
146 string newflag = flagName.substr(1, flagName.length() - 1);