mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-29 00:10:02 -05:00
feat: Added logger module to script loader
This commit is contained in:
34
plugins/script_loader/source/script_api/v1/logger.cpp
Normal file
34
plugins/script_loader/source/script_api/v1/logger.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include <script_api.hpp>
|
||||
|
||||
#include <hex/api/imhex_api.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
#define VERSION V1
|
||||
|
||||
SCRIPT_API(void logPrint, const char *message) {
|
||||
hex::log::print("{}", message);
|
||||
}
|
||||
|
||||
SCRIPT_API(void logPrintln, const char *message) {
|
||||
hex::log::println("{}", message);
|
||||
}
|
||||
|
||||
SCRIPT_API(void logDebug, const char *message) {
|
||||
hex::log::debug("{}", message);
|
||||
}
|
||||
|
||||
SCRIPT_API(void logInfo, const char *message) {
|
||||
hex::log::info("{}", message);
|
||||
}
|
||||
|
||||
SCRIPT_API(void logWarn, const char *message) {
|
||||
hex::log::warn("{}", message);
|
||||
}
|
||||
|
||||
SCRIPT_API(void logError, const char *message) {
|
||||
hex::log::error("{}", message);
|
||||
}
|
||||
|
||||
SCRIPT_API(void logFatal, const char *message) {
|
||||
hex::log::fatal("{}", message);
|
||||
}
|
||||
Reference in New Issue
Block a user