Changeset 13754 for trunk/FACT++/src
- Timestamp:
- 05/16/12 10:05:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/dimctrl.cc
r13753 r13754 161 161 if (txt=="") 162 162 { 163 ostringstream pid; 164 pid << getpid(); 165 163 166 fLabel = qos; 164 167 165 if (fDebug) 166 { 167 string msg; 168 switch (fLabel) 169 { 170 case -3: msg = Line("End ["+Readline::GetScript()+"]", '='); break; 171 case -2: msg = Line("Load ["+Readline::GetScript()+"]", '='); break; 172 case -1: msg = Line("Begin ["+Readline::GetScript()+"]", '-'); break; 173 default: 174 { 175 ostringstream out; 176 out << "Label " << fLabel << " [" << Readline::GetScript() << "]"; 177 msg = Line(out.str(), '-'); 178 } 179 } 180 181 MessageDimTX::Write(time, msg, 90); 182 } 183 184 fSrvState.setQuality(fLabel); 168 string msg; 185 169 switch (fLabel) 186 170 { 187 case -3: return fSrvState.Update(Readline::GetScript()+" [end]"); 188 case -2: return fSrvState.Update(Readline::GetScript()+" [load]"); 189 case -1: return fSrvState.Update(Readline::GetScript()+" [start]"); 171 case -3: msg = "End"; break; 172 case -2: msg = "Load"; break; 173 case -1: msg = "Begin"; break; 174 default: 175 { 176 ostringstream out; 177 out << "Label " << fLabel; 178 msg = out.str(); 179 } 190 180 } 191 181 192 ostringstream msg; 193 msg << Readline::GetScript() << " [" << fLabel << "]"; 194 return fSrvState.Update(msg.str()); 182 msg += ": "+Readline::GetScript()+" ["; 183 if (!fUser.empty()) 184 msg += fUser+":"+pid.str(); 185 msg += "]"; 186 187 if (fDebug) 188 MessageDimTX::Write(time, Line(msg, fLabel<-1 ? '=' :'-'), 90); 189 190 fSrvState.setQuality(fLabel); 191 return fSrvState.Update(msg); 195 192 } 196 193 … … 271 268 ("quiet,q", po_bool(false), "Suppress all output except comments (log-level>=90)") 272 269 ("debug", po_bool(false), "Print the labels for debugging purpose") 273 ("start", var<string>(), " ")274 ("stop", po_switch(), " ")275 ("user,u", var<string>( ), "A user name - just for logging purposes")270 ("start", var<string>(), "Start a script with the given name at the given label (script.dim[:N])") 271 ("stop", po_switch(), "Stop a currently running script") 272 ("user,u", var<string>(""), "A user name - just for logging purposes (default is ${USER})") 276 273 ; 274 275 conf.AddEnv("user", "USER"); 277 276 278 277 conf.AddOptions(control);
Note:
See TracChangeset
for help on using the changeset viewer.