[ox/std] Add oxInfo log event type
This commit is contained in:
parent
f58abd9c3f
commit
351ae69f6f
2
deps/ox/src/ox/std/trace.hpp
vendored
2
deps/ox/src/ox/std/trace.hpp
vendored
@ -175,6 +175,8 @@ void init();
|
|||||||
#define oxTracef(ch, fmt, ...) ox::trace::TraceStream(__FILE__, __LINE__, ch, ox::detail::fmtSegments<ox::detail::argCount(fmt)+1>(fmt), ##__VA_ARGS__)
|
#define oxTracef(ch, fmt, ...) ox::trace::TraceStream(__FILE__, __LINE__, ch, ox::detail::fmtSegments<ox::detail::argCount(fmt)+1>(fmt), ##__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define oxInfo(...) oxTrace("info", __VA_ARGS__)
|
||||||
|
#define oxInfof(...) oxTracef("info", __VA_ARGS__)
|
||||||
#define oxError(...) oxTrace("error", __VA_ARGS__)
|
#define oxError(...) oxTrace("error", __VA_ARGS__)
|
||||||
#define oxErrorf(...) oxTracef("error", __VA_ARGS__)
|
#define oxErrorf(...) oxTracef("error", __VA_ARGS__)
|
||||||
|
|
||||||
|
2
deps/ox/src/ox/std/tracehook.cpp
vendored
2
deps/ox/src/ox/std/tracehook.cpp
vendored
@ -29,7 +29,7 @@ void oxTraceHook([[maybe_unused]] const char *file, [[maybe_unused]] int line,
|
|||||||
std::cout << std::setw(53) << std::left << ch << "| ";
|
std::cout << std::setw(53) << std::left << ch << "| ";
|
||||||
std::cout << std::setw(65) << std::left << msg << '|';
|
std::cout << std::setw(65) << std::left << msg << '|';
|
||||||
std::cout << " " << file << ':' << line << "\n";
|
std::cout << " " << file << ':' << line << "\n";
|
||||||
} else if (ox_strcmp(ch, "debug") == 0) {
|
} else if (ox_strcmp(ch, "debug") == 0 || ox_strcmp(ch, "info") == 0) {
|
||||||
std::cout << msg << '\n';
|
std::cout << msg << '\n';
|
||||||
} else if (ox_strcmp(ch, "error") == 0) {
|
} else if (ox_strcmp(ch, "error") == 0) {
|
||||||
std::cerr << "\033[31;1;1mERROR:\033[0m (" << file << ':' << line << "): " << msg << '\n';
|
std::cerr << "\033[31;1;1mERROR:\033[0m (" << file << ':' << line << "): " << msg << '\n';
|
||||||
|
Loading…
Reference in New Issue
Block a user