Class basic_file_sink

Synopsis

#include <include/spdlog/sinks/basic_file_sink.h>

template<typename Mutex>
class basic_file_sink final : public base_sink<Mutex>

Description

Trivial file sink with single file as target

Inheritance

Ancestors: base_sink

Methods

basic_file_sink
filename
flush_
sink_it_

Source

Lines 19-32 in include/spdlog/sinks/basic_file_sink.h.

template<typename Mutex>
class basic_file_sink final : public base_sink<Mutex>
{
public:
    explicit basic_file_sink(const filename_t &filename, bool truncate = false);
    const filename_t &filename() const;

protected:
    void sink_it_(const details::log_msg &msg) override;
    void flush_() override;

private:
    details::file_helper file_helper_;
};





Add Discussion

Log in to comment