Windows
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/cmake-build-debug
|
||||
/.idea
|
@@ -79,31 +79,31 @@ namespace jlog::ansi_escape_codes
|
||||
|
||||
std::string cursor_to(int line, int col)
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string cursor_up(int lines)
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string cursor_down(int lines)
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string cursor_left(int cols)
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string cursor_right(int cols)
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string cursor_to_col(int col)
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,15 @@
|
||||
#include <Event.h>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef __linux__
|
||||
#define FUNCTION __PRETTY_FUNCTION__
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define FUNCTION __FUNCSIG__
|
||||
#endif
|
||||
|
||||
|
||||
namespace jlog
|
||||
{
|
||||
enum class severity
|
||||
@@ -36,7 +45,7 @@ namespace jlog
|
||||
|
||||
static Event<LogEntry> on_log = Event<LogEntry>();
|
||||
|
||||
std::vector<LogEntry> log_history;
|
||||
inline std::vector<LogEntry> log_history;
|
||||
|
||||
struct token
|
||||
{
|
||||
@@ -109,31 +118,31 @@ namespace jlog
|
||||
|
||||
}
|
||||
|
||||
#define INFO(i) jlog::info_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define SINFO(i) jlog::sinfo_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define USINFO(i) jlog::usinfo_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define INFO(i) jlog::info_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define SINFO(i) jlog::sinfo_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define USINFO(i) jlog::usinfo_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
|
||||
|
||||
#define VERBOSE(i) jlog::verbose_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define SVERBOSE(i) jlog::sverbose_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define USVERBOSE(i) jlog::usverbose_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define VERBOSE(i) jlog::verbose_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define SVERBOSE(i) jlog::sverbose_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define USVERBOSE(i) jlog::usverbose_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
|
||||
|
||||
#define DEBUG(i) jlog::debug_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define SDEBUG(i) jlog::sdebug_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define USDEBUG(i) jlog::usdebug_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define DEBUG(i) jlog::debug_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define SDEBUG(i) jlog::sdebug_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define USDEBUG(i) jlog::usdebug_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
|
||||
|
||||
#define WARNING(i) jlog::warning_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define SWARNING(i) jlog::swarning_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define USWARNING(i) jlog::uswarning_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define WARNING(i) jlog::warning_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define SWARNING(i) jlog::swarning_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define USWARNING(i) jlog::uswarning_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
|
||||
|
||||
#define ERROR(i) jlog::error_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define SERROR(i) jlog::serror_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define USERROR(i) jlog::userror_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define ERROR(i) jlog::error_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define SERROR(i) jlog::serror_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define USERROR(i) jlog::userror_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
|
||||
|
||||
#define FATAL(i) jlog::fatal_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define SFATAL(i) jlog::sfatal_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define USFATAL(i) jlog::usfatal_spec(i, __PRETTY_FUNCTION__, __FILE__, __LINE__);
|
||||
#define FATAL(i) jlog::fatal_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define SFATAL(i) jlog::sfatal_spec(i, FUNCTION, __FILE__, __LINE__);
|
||||
#define USFATAL(i) jlog::usfatal_spec(i, FUNCTION, __FILE__, __LINE__);
|
Reference in New Issue
Block a user