refactor(log): reduce compile time LOG_LEVEL granularity

This commit is contained in:
bfredl
2023-02-26 12:51:03 +01:00
parent 6cab36e5b7
commit 2ba224e152
14 changed files with 108 additions and 146 deletions

View File

@@ -1095,15 +1095,3 @@ void vim_unescape_ks(char *p)
}
*d = NUL;
}
/// Logs a single key as a human-readable keycode.
void log_key(int log_level, int key)
{
if (log_level < MIN_LOG_LEVEL) {
return;
}
char *keyname = key == K_EVENT
? "K_EVENT"
: (char *)get_special_key_name(key, mod_mask);
LOG(log_level, "input: %s", keyname);
}