feat(logging): add extra logging streams
This commit is contained in:
parent
bf2847cc09
commit
6a11db9a2e
@ -32,8 +32,14 @@ namespace ICEngine {
|
||||
this->level = level;
|
||||
}
|
||||
|
||||
void AddStream(std::ostream * stream) {
|
||||
this->streams.push_back(stream);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
void Log(LogLevel level, const char *file, int line, const char *func, const std::string &formatStr, Args &&... args) {
|
||||
// TODO: Create a crash handler and manage fatal messages separately (creates crashdump)
|
||||
// TODO: Allow user to create their own class that inherits Fatal Handler so they can implement it themselves
|
||||
if (level < this->level) return;
|
||||
std::string formattedMessage = format(formatStr, std::forward<Args>(args)...);
|
||||
std::string logMessage = formatMessage(level, file, line, func, formattedMessage);
|
||||
|
Loading…
x
Reference in New Issue
Block a user