stderr_writer.cpp 570 B

12345678910111213141516171819
  1. #include "stderr_writer.h"
  2. #include <util/stream/str.h>
  3. using namespace NLWTrace;
  4. bool TStderrActionExecutor::DoExecute(TOrbit&, const TParams& params) {
  5. TString ParamValues[LWTRACE_MAX_PARAMS];
  6. Probe->Event.Signature.SerializeParams(params, ParamValues);
  7. TStringStream ss;
  8. ss << Probe->Event.GetProvider() << "." << Probe->Event.Name;
  9. for (ui32 i = 0; i < Probe->Event.Signature.ParamCount; ++i) {
  10. ss << " " << Probe->Event.Signature.ParamNames[i] << "=" << ParamValues[i];
  11. }
  12. ss << "\n";
  13. Cerr << ss.Str();
  14. return true;
  15. }