aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/lwtrace/stderr_writer.cpp
blob: 92f05dfdbfa113b6c078c21e1811295d2f4fef5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "stderr_writer.h"

#include <util/stream/str.h>

using namespace NLWTrace;

bool TStderrActionExecutor::DoExecute(TOrbit&, const TParams& params) {
    TString ParamValues[LWTRACE_MAX_PARAMS]; 
    Probe->Event.Signature.SerializeParams(params, ParamValues);

    TStringStream ss;
    ss << Probe->Event.GetProvider() << "." << Probe->Event.Name;
    for (ui32 i = 0; i < Probe->Event.Signature.ParamCount; ++i) {
        ss << " " << Probe->Event.Signature.ParamNames[i] << "=" << ParamValues[i];
    }
    ss << "\n";
    Cerr << ss.Str();
    return true;
}