mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-30 14:18:44 +00:00
This commit is contained in:
parent
930559bbcc
commit
edbebf48b7
1 changed files with 1 additions and 13 deletions
|
@ -80,18 +80,6 @@ enum LOG_LEVELS
|
||||||
|
|
||||||
static const char LOG_LEVEL_TO_CHAR[7] = "-NEWID";
|
static const char LOG_LEVEL_TO_CHAR[7] = "-NEWID";
|
||||||
|
|
||||||
// Short File code taken from https://blog.galowicz.de/2016/02/20/short_file_macro/
|
|
||||||
static constexpr const char* past_last_slash(const char* str, const char* last_slash)
|
|
||||||
{
|
|
||||||
return *str == '\0' ? last_slash
|
|
||||||
: *str == '/' || *str == '\\' ? past_last_slash(str + 1, str + 1) : past_last_slash(str + 1, last_slash);
|
|
||||||
}
|
|
||||||
|
|
||||||
static constexpr const char* past_last_slash(const char* str)
|
|
||||||
{
|
|
||||||
return past_last_slash(str, str);
|
|
||||||
}
|
|
||||||
|
|
||||||
void GenericLogFmtImpl(LOG_LEVELS level, LOG_TYPE type, const char* file, int line,
|
void GenericLogFmtImpl(LOG_LEVELS level, LOG_TYPE type, const char* file, int line,
|
||||||
fmt::string_view format, const fmt::format_args& args);
|
fmt::string_view format, const fmt::format_args& args);
|
||||||
|
|
||||||
|
@ -126,7 +114,7 @@ void GenericLog(LOG_LEVELS level, LOG_TYPE type, const char* file, int line, con
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (v <= MAX_LOGLEVEL) \
|
if (v <= MAX_LOGLEVEL) \
|
||||||
Common::Log::GenericLog(v, t, Common::Log::past_last_slash(__FILE__), __LINE__, __VA_ARGS__); \
|
Common::Log::GenericLog(v, t, __FILE__, __LINE__, __VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define ERROR_LOG(t, ...) \
|
#define ERROR_LOG(t, ...) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue