Implement basic capability to log to specified file.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
/// Developed & Maintained by Josh O'Leary
|
||||
/// This work is dedicated to the public domain.
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <format>
|
||||
@@ -40,6 +39,7 @@ namespace jlog
|
||||
std::string timestamp;
|
||||
};
|
||||
|
||||
// TODO: Fully implement logging callback.
|
||||
static Event<LogEntry> on_log = Event<LogEntry>();
|
||||
|
||||
inline std::vector<LogEntry> log_history;
|
||||
@@ -51,9 +51,13 @@ namespace jlog
|
||||
std::string delimiter = "[]";
|
||||
};
|
||||
|
||||
void set_default_logfile(const std::string& filename);
|
||||
|
||||
std::string get_timestamp();
|
||||
void log_to_console(const std::string& message);
|
||||
void log_to_file(const std::string& message);
|
||||
void log_to_file(const std::string& filename, const std::string& message);
|
||||
void log_to_stream(std::ostream stream, const std::string& message);
|
||||
|
||||
void log(std::vector<token> tokens);
|
||||
|
||||
|
Reference in New Issue
Block a user