#ifndef TILE_BASE_LOGGING_CONSOLE_SINK_H
#define TILE_BASE_LOGGING_CONSOLE_SINK_H

#pragma once

#include "tile/base/internal/logging.h"

namespace tile {
class ConsoleSink : public LogSink {
public:
    using Ptr = std::shared_ptr<ConsoleSink>;
    static Ptr Create();

    const char *name() const override { return "ConsoleSink"; }

    ~ConsoleSink() override;
    void Send(LogSeverity severity,
              const char *full_filename,
              const char *base_filename,
              int line,
              const LogMessageTime &logmsgtime,
              const char *message,
              size_t message_len) override;
    void Flush() override;

protected:
    ConsoleSink();
};
}// namespace tile

#endif// TILE_BASE_LOGGING_CONSOLE_SINK_H
