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 {
|
2020-04-21 12:42:05 +10:00
|
|
|
class path : public crtp<path> {
|
2020-04-21 10:55:36 +10:00
|
|
|
public:
|
2020-04-21 12:42:05 +10:00
|
|
|
path (std::string name);
|
2020-04-21 10:55:36 +10:00
|
|
|
|
|
|
|
void write (packet const&) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::ofstream m_output;
|
|
|
|
};
|
|
|
|
}
|