diff options
author | Emma Miler <emma.pi@protonmail.com> | 2022-12-02 23:00:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 23:00:33 +0100 |
commit | 2d59006262d6e45f41ee325af78433475884dca4 (patch) | |
tree | 939c84779bf6a455102c74937f238a0ec05698eb /NorthstarDLL/include/spdlog/details/file_helper.h | |
parent | be78dbacc5dcc95e7d9be503d61ceb5de640c661 (diff) | |
download | NorthstarLauncher-2d59006262d6e45f41ee325af78433475884dca4.tar.gz NorthstarLauncher-2d59006262d6e45f41ee325af78433475884dca4.zip |
Move include directory (#337)v1.11.0-rc1
* Move include directory to shared folder
This commit moves the `include` directory from the NorthstarDLL project folder to the solution folder. This allows both the DLL and Launcher project to target it properly.
* Fix filters
* Update memalloc.h
* Fix filters
* Update NorthstarLauncher.vcxproj
* Remove stuff from other PR
* Update NorthstarLauncher.vcxproj
* Update NorthstarLauncher.vcxproj
* Update NorthstarDLL.vcxproj
Diffstat (limited to 'NorthstarDLL/include/spdlog/details/file_helper.h')
-rw-r--r-- | NorthstarDLL/include/spdlog/details/file_helper.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/NorthstarDLL/include/spdlog/details/file_helper.h b/NorthstarDLL/include/spdlog/details/file_helper.h deleted file mode 100644 index 5395d9cb..00000000 --- a/NorthstarDLL/include/spdlog/details/file_helper.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright(c) 2015-present, Gabi Melman & spdlog contributors. -// Distributed under the MIT License (http://opensource.org/licenses/MIT) - -#pragma once - -#include <spdlog/common.h> -#include <tuple> - -namespace spdlog { -namespace details { - -// Helper class for file sinks. -// When failing to open a file, retry several times(5) with a delay interval(10 ms). -// Throw spdlog_ex exception on errors. - -class SPDLOG_API file_helper -{ -public: - explicit file_helper() = default; - - file_helper(const file_helper &) = delete; - file_helper &operator=(const file_helper &) = delete; - ~file_helper(); - - void open(const filename_t &fname, bool truncate = false); - void reopen(bool truncate); - void flush(); - void close(); - void write(const memory_buf_t &buf); - size_t size() const; - const filename_t &filename() const; - - // - // return file path and its extension: - // - // "mylog.txt" => ("mylog", ".txt") - // "mylog" => ("mylog", "") - // "mylog." => ("mylog.", "") - // "/dir1/dir2/mylog.txt" => ("/dir1/dir2/mylog", ".txt") - // - // the starting dot in filenames is ignored (hidden files): - // - // ".mylog" => (".mylog". "") - // "my_folder/.mylog" => ("my_folder/.mylog", "") - // "my_folder/.mylog.txt" => ("my_folder/.mylog", ".txt") - static std::tuple<filename_t, filename_t> split_by_extension(const filename_t &fname); - -private: - const int open_tries_ = 5; - const int open_interval_ = 10; - std::FILE *fd_{nullptr}; - filename_t filename_; -}; -} // namespace details -} // namespace spdlog - -#ifdef SPDLOG_HEADER_ONLY -#include "file_helper-inl.h" -#endif |