summaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/log/ut/log_parser.h
blob: a1bea046821ebb650c1c4d4708f5c4d2cf62b58c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

#include <yql/essentials/utils/log/log_component.h>
#include <yql/essentials/utils/log/log_level.h>

#include <library/cpp/testing/unittest/registar.h>
#include <library/cpp/json/json_reader.h>

#include <util/datetime/base.h>

namespace NYql {
namespace NLog {

struct TLogRow {
    TInstant Time;
    ELevel Level;
    TString ProcName;
    pid_t ProcId;
    ui64 ThreadId;
    EComponent Component;
    TString FileName;
    ui32 LineNumber;
    TString Path;
    TString Message;
};

TLogRow ParseLegacyLogRow(TStringBuf str);
TLogRow ParseJsonLogRow(TStringBuf str);

} // namspace NLog
} // namspace NYql