aboutsummaryrefslogtreecommitdiffstats
path: root/library/c/tvmauth/src/logger.h
blob: d33333abaf89fe2c587f0e02aaa55a3e48e3b5a6 (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
#pragma once

#include <library/c/tvmauth/high_lvl_client.h>

#include <library/cpp/tvmauth/client/logger.h>

#include <util/generic/string.h>

namespace NTvmAuthC {
    class TLoggerC: public NTvmAuth::ILogger {
    public:
        TLoggerC(TA_TLoggerFunc f)
            : F_(f)
        {
        }

    private:
        void Log(int lvl, const TString& msg) override {
            F_(lvl, msg.c_str());
        }

    private:
        TA_TLoggerFunc F_;
    };
}