libcruft-util/log/sink/path.hpp

29 lines
575 B
C++
Raw Normal View History

2020-04-21 10:55:36 +10:00
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright 2020, Danny Robson <danny@nerdcruft.net>
*/
#pragma once
#include "base.hpp"
#include <string>
#include <fstream>
#include <filesystem>
namespace cruft::log::sink {
class path : public crtp<path> {
2020-04-21 10:55:36 +10:00
public:
path (std::string name);
2020-04-21 10:55:36 +10:00
void write (packet const&) override;
private:
std::ofstream m_output;
};
}