37#ifndef INCLUDE_GUARD_EUNOMIA_DEBUG_LOGGER_H
38#define INCLUDE_GUARD_EUNOMIA_DEBUG_LOGGER_H
74 DebugLogger_&
operator<<(std::ostream& (*mnp)(std::ostream&))
77 DebugLogger_&
operator<<(
const Timestamp_& ts) {
return *
this; }
79 static DebugLogger_&
out()
81 static DebugLogger_ d;
85 static void set(
const std::filesystem::path& path) {}
91 static inline std::filesystem::path path_ =
"eunomiaDebugLog.txt";
92 static inline std::ofstream ofs_;
117 auto now = std::time(
nullptr);
118 ofs_ << std::put_time(std::localtime(&now),
"[%Y/%m/%d %H:%M:%S] ");
126 ofs_.open(path_, std::ios::app);
130 static void set(
const std::filesystem::path& path) { path_ = path; }
Definition debuglogger.h:60
デバッグログ出力ストリーム
Definition debuglogger.h:58
static void set(const std::filesystem::path &path)
Definition debuglogger.h:130
static DebugLogger_ & out()
Definition debuglogger.h:122
DebugLogger_ & operator<<(const Timestamp_ &ts)
Definition debuglogger.h:115
DebugLogger_ & operator<<(const T &x)
Definition debuglogger.h:96
DebugLogger_ & operator<<(const T *x)
Definition debuglogger.h:103
DebugLogger_ & operator<<(std::ostream &(*mnp)(std::ostream &))
Definition debuglogger.h:109
Definition debuglogger.h:47
implement_::DebugLogger_::Timestamp_ timestamp()
Definition debuglogger.h:144
void setLoggingFile(const std::filesystem::path &path)
Definition debuglogger.h:150
implement_::DebugLogger_ & out()
Definition debuglogger.h:138