34 std::begin(fallbackPaths);
35 { *std::begin(fallbackPaths) }-> std::convertible_to<std::string>;
36 std::end(fallbackPaths);
40 for (
auto &i: fallbackPaths)
42 const std::string _path = i;
46 m_PathFmts.emplace_back(std::filesystem::absolute(_path).
string());
48 m_FileSizeLimit = fsize_in_bytes;
56 std::ostream *
snap()
override;
61 const std::chrono::time_zone *
const m_tz;
63 std::string m_CurrPath;
64 std::vector<std::string> m_PathFmts;
65 uintmax_t m_FileSizeLimit{};
66 size_t m_CurPathFmt{};
67 std::chrono::sys_seconds m_OldTime;
68 std::ios_base::openmode m_OpenMode{std::ios_base::out};
69 bool m_AutoMkDir{
true};
#define RUNTIME_ERROR(fmtStr,...)
Wrap FILE(DATE)#__LINE__ FUNCTION: msg into std::runtime_error.
C_PathFmtLogSnap & enableAutoMkDir(bool yes=true)
std::ostream * snap() override
Snap the current T value.
C_PathFmtLogSnap(const std::chrono::time_zone *tz)
C_PathFmtLogSnap & configPath(uintmax_t fsize_in_bytes, const auto &fallbackPaths)
C_PathFmtLogSnap & setBinaryMode(bool enabled)
C_PathFmtLogSnap(bool use_local_time=true)
C_PathFmtLogSnap & configPath(const std::string &pathFmt)
THE common namespace of bux library.