#pragma once

#include <cstdio>
#include <cstdarg>
#include <ctime>
#include <utility>

namespace logc {

enum class Level { Info, Success, Warn, Error };

void write(Level level, const char* fmt, ...);

// Convenience wrappers
template <typename... Args>
void info(const char* fmt, Args&&... args) {
    write(Level::Info, fmt, std::forward<Args>(args)...);
}

template <typename... Args>
void success(const char* fmt, Args&&... args) {
    write(Level::Success, fmt, std::forward<Args>(args)...);
}

template <typename... Args>
void warn(const char* fmt, Args&&... args) {
    write(Level::Warn, fmt, std::forward<Args>(args)...);
}

template <typename... Args>
void error(const char* fmt, Args&&... args) {
    write(Level::Error, fmt, std::forward<Args>(args)...);
}

} // namespace logc
