}
else
{
- LOG_WARNINGF("Unrecognized mode %s\n", mode);
+ LOG_WARNF("Unrecognized mode %s\n", mode);
return false;
}
// printf("^1 skipping %s\n", s);
}
if(QuickMenu_Buffer_Index == QuickMenu_Buffer_Size)
- LOG_WARNINGF("Couldn't find submenu \"%s\"\n", z_submenu);
+ LOG_WARNF("Couldn't find submenu \"%s\"\n", z_submenu);
}
// only the last page can contain up to QUICKMENU_MAXLINES entries
if(target_submenu != "" && !target_submenu_found)
{
- LOG_WARNINGF("Couldn't find submenu \"%s\"\n", target_submenu);
+ LOG_WARNF("Couldn't find submenu \"%s\"\n", target_submenu);
if(prvm_language != "en")
- LOG_WARNINGF("^3Warning: submenu must be in English\n", target_submenu);
+ LOG_WARNF("^3Warning: submenu must be in English\n", target_submenu);
QuickMenu_Buffer_Size = 0;
}
}
if (autocvar_developer_csqcentities) LOG_INFOF("CSQC_Ent_Remove() with this=%i {.entnum=%d, .enttype=%d}\n", this, this.entnum, this.enttype);
if (wasfreed(this))
{
- LOG_WARNING("CSQC_Ent_Remove called for already removed entity. Packet loss?\n");
+ LOG_WARN("CSQC_Ent_Remove called for already removed entity. Packet loss?\n");
return;
}
if (this.enttype) Ent_Remove(this);
#undef p
#undef MY
default:
- LOG_WARNINGF("Unknown property '%s'\n", k);
+ LOG_WARNF("Unknown property '%s'\n", k);
break;
}
}
LOG_INFOF("Reload with ^2cl_particles_reloadeffects data/%s^7.\n", filename);
fclose(fh);
} else {
- LOG_WARNINGF("Could not open file '%s'!\n", filename);
+ LOG_WARNF("Could not open file '%s'!\n", filename);
}
return;
}
else
{
// Can this happen?
- LOG_WARNINGF("Missing entcs data for player %d\n", who);
+ LOG_WARNF("Missing entcs data for player %d\n", who);
sound8(e, o, chan, sample, vol, atten, 0, 0);
}
return true;
else
{
// Can this happen?
- LOG_WARNINGF("Missing entcs data for player %d\n", who);
+ LOG_WARNF("Missing entcs data for player %d\n", who);
sound8(e, o, chan, sample, vol, atten, 0, 0);
}
return true;
int fh = fopen(f, FILE_READ);
if (fh < 0)
{
- LOG_WARNINGF("Player sound file not found: %s\n", f);
+ LOG_WARNF("Player sound file not found: %s\n", f);
return;
}
for (string s; (s = fgets(fh)); )
int n = tokenize_console(s);
if (n != 3)
{
- if (n != 0) LOG_WARNINGF("Invalid sound info line: %s\n", s);
+ if (n != 0) LOG_WARNF("Invalid sound info line: %s\n", s);
continue;
}
string file = argv(1);
int fh = fopen(f, FILE_READ);
if (fh < 0)
{
- if (strict) LOG_WARNINGF("Player sound file not found: %s\n", f);
+ if (strict) LOG_WARNF("Player sound file not found: %s\n", f);
return false;
}
for (string s; (s = fgets(fh)); )
int n = tokenize_console(s);
if (n != 3)
{
- if (n != 0) LOG_WARNINGF("Invalid sound info line: %s\n", s);
+ if (n != 0) LOG_WARNF("Invalid sound info line: %s\n", s);
continue;
}
string key = argv(0);
FOREACH(Gametypes, it.m_flags == _t, { t = it; break; });
// t is now a supported mode!
- LOG_WARNING("can't play the selected map in the given game mode. Falling back to a supported mode.\n");
+ LOG_WARN("can't play the selected map in the given game mode. Falling back to a supported mode.\n");
MapInfo_LoadMapSettings_SaveGameType(t);
}
MapInfo_Get_ByName(s, 1, t);
bool autocvar_developer_mapper;
-#define LOG_MAPWARN(...) MACRO_BEGIN { if (autocvar_developer_mapper) LOG_WARNING(__VA_ARGS__); } MACRO_END
-#define LOG_MAPWARNF(...) MACRO_BEGIN { if (autocvar_developer_mapper) LOG_WARNINGF(__VA_ARGS__); } MACRO_END
+#define LOG_MAPWARN(...) MACRO_BEGIN { if (autocvar_developer_mapper) LOG_WARN(__VA_ARGS__); } MACRO_END
+#define LOG_MAPWARNF(...) MACRO_BEGIN { if (autocvar_developer_mapper) LOG_WARNF(__VA_ARGS__); } MACRO_END
#include "util.qh"
TC(Model, this);
string s = this.model_str();
if (s != "" && s != "null" && !fexists(s)) {
- LOG_WARNINGF("Missing model: \"%s\"\n", s);
+ LOG_WARNF("Missing model: \"%s\"\n", s);
return;
}
profile(sprintf("precache_model(\"%s\")\n", s));
WITH(bool, mutator_log, true, LAMBDA(
FOREACH(Mutators, it.registered_id == s, { Mutator_Add(it); ++added; });
));
- if (added > 1) LOG_WARNINGF("Added more than one mutator for %s\n", s);
+ if (added > 1) LOG_WARNF("Added more than one mutator for %s\n", s);
}
}
#endif
}
else if(icon != "")
{
- LOG_WARNINGF(
+ LOG_WARNF(
(
"^1NOTIFICATION HAS ICON BUT NO HUDARGS: "
"^7net_type = %s, net_name = %s.\n"
if (cpid == CPID_Null && durcnt != "0 0")
{
- LOG_WARNINGF(
+ LOG_WARNF(
(
"Notification has durcnt but no cpid: "
"net_type = %s, net_name = %s."
Get_Notif_TypeName(net_type)
));
#endif
- LOG_WARNINGF("Incorrect usage of Local_Notification: %s\n", "Null notification");
+ LOG_WARNF("Incorrect usage of Local_Notification: %s\n", "Null notification");
return;
}
#endif
string checkargs = Notification_CheckArgs(broadcast, client);
- if (checkargs != "") { LOG_WARNINGF("Incorrect usage of Kill_Notification: %s", checkargs); return; }
+ if (checkargs != "") { LOG_WARNF("Incorrect usage of Kill_Notification: %s", checkargs); return; }
entity net_notif = new_pure(net_kill_notification);
net_notif.nent_broadcast = broadcast;
if (!notif)
{
- LOG_WARNING("Send_Notification: Could not find notification entity!");
+ LOG_WARN("Send_Notification: Could not find notification entity!");
return;
}
if (!net_name) { checkargs = sprintf("No notification provided! %s", checkargs); }
if (checkargs != "")
{
- LOG_WARNINGF("Incorrect usage of Send_Notification: %s", checkargs);
+ LOG_WARNF("Incorrect usage of Send_Notification: %s", checkargs);
return;
}
if ((notif.nent_stringcount + notif.nent_floatcount) != count)
{
- LOG_WARNINGF(
+ LOG_WARNF(
"Argument mismatch for Send_Notification(%s, ...)! "
"stringcount(%d) + floatcount(%d) != count(%d)\n"
"Check the definition and function call for accuracy...?\n",
case MSG_MULTI: return "MSG_MULTI";
case MSG_CHOICE: return "MSG_CHOICE";
}
- LOG_WARNINGF("Get_Notif_TypeName(%d): Improper net type!\n", ORDINAL(net_type));
+ LOG_WARNF("Get_Notif_TypeName(%d): Improper net type!\n", ORDINAL(net_type));
return "";
}
case NOTIF_TEAM: return "NOTIF_TEAM";
case NOTIF_TEAM_EXCEPT: return "NOTIF_TEAM_EXCEPT";
}
- LOG_WARNINGF("Get_Notif_BroadcastName(%d): Improper broadcast!\n", broadcast);
+ LOG_WARNF("Get_Notif_BroadcastName(%d): Improper broadcast!\n", broadcast);
return "";
}
{
Notification it = _Notifications_from(net_name, NULL);
if (it.nent_type != net_type) {
- LOG_WARNINGF("Get_Notif_Ent(%s (%d), %s (%d)): Improper net type '%s'!\n",
+ LOG_WARNF("Get_Notif_Ent(%s (%d), %s (%d)): Improper net type '%s'!\n",
Get_Notif_TypeName(net_type), net_type,
it.registered_id, net_name,
Get_Notif_TypeName(it.nent_type)
/**/
#define tryext(ext) { string s = strcat(base, "." #ext); if (fexists(strcat("sound/", s))) return s; }
extensions(tryext);
- LOG_WARNINGF("Missing sound: \"%s\"\n", strcat("sound/", base));
+ LOG_WARNF("Missing sound: \"%s\"\n", strcat("sound/", base));
#undef tryext
#undef extensions
return string_null;
}
else
{
- LOG_WARNINGF("weapon model %s does not support the 'shot' tag, will display shots TOTALLY wrong\n",
+ LOG_WARNF("weapon model %s does not support the 'shot' tag, will display shots TOTALLY wrong\n",
this.model);
this.movedir = '0 0 0';
}
}
else
{
- LOG_WARNINGF("weapon model %s does not support the 'shell' tag, will display casings wrong\n",
+ LOG_WARNF("weapon model %s does not support the 'shell' tag, will display casings wrong\n",
this.model);
this.spawnorigin = this.movedir;
}
}
else
{
- LOG_WARNINGF(
+ LOG_WARNF(
"weapon model %s does not support the 'handle' tag "
"and neither does the v_ model support the 'shot' tag, "
"will display muzzle flashes TOTALLY wrong\n",
#endif
#ifdef CSQC
METHOD(PortoLaunch, wr_impacteffect, void(entity this, entity actor)) {
- LOG_WARNING("Since when does Porto send DamageInfo?\n");
+ LOG_WARN("Since when does Porto send DamageInfo?\n");
}
#endif
#endif
Tuba_PitchStep = autocvar_g_balance_tuba_pitchstep;
if (Tuba_PitchStep) {
if (!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7")) {
- LOG_WARNING("requested pitch shifting, but not supported by this engine build");
+ LOG_WARN("requested pitch shifting, but not supported by this engine build");
Tuba_PitchStep = 0;
}
}
#else
#define TC(T, sym) MACRO_BEGIN \
if (!is_##T(sym)) { \
- LOG_WARNINGF("Type check failed: " #sym " :: " #T); \
+ LOG_WARNF("Type check failed: " #sym " :: " #T); \
isnt_##T(sym); \
} \
MACRO_END
#endif
#define objerror(this, msg) MACRO_BEGIN { \
- LOG_WARNING("======OBJECT ERROR======"); \
+ LOG_WARN("======OBJECT ERROR======"); \
entity _e = (this); \
eprint(_e); \
objerror_safe(_e); \
delete(_e); \
- LOG_WARNINGF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); \
+ LOG_WARNF("%s OBJECT ERROR in %s:\n%s\nTip: read above for entity information", PROGNAME, __FUNC__, msg); \
} MACRO_END
#ifdef MENUQC
return;
}
}
- LOG_WARNINGF("IntrusiveList overflow");
+ LOG_WARNF("IntrusiveList overflow");
}
void IL_DTOR(IntrusiveList this)
#define LOG_SEVEREF(...) _LOG_SEVERE(sprintf(__VA_ARGS__))
#define _LOG_SEVERE(s) _LOG(backtrace, "^1SEVERE", s)
-#define LOG_WARNING(...) _LOG_WARNING(strcat0n(__VA_ARGS__))
-#define LOG_WARNINGF(...) _LOG_WARNING(sprintf(__VA_ARGS__))
-#define _LOG_WARNING(s) _LOG(print, "^3WARNING", s)
+#define LOG_WARN(...) _LOG_WARN(strcat0n(__VA_ARGS__))
+#define LOG_WARNF(...) _LOG_WARN(sprintf(__VA_ARGS__))
+#define _LOG_WARN(s) _LOG(print, "^3WARNING", s)
#define LOG_INFO(...) _LOG_INFO(strcat0n(__VA_ARGS__))
#define LOG_INFOF(...) _LOG_INFO(sprintf(__VA_ARGS__))
int fh = fopen(filename, FILE_WRITE);
if (fh < 0)
{
- LOG_WARNINGF("^1Can't write DB to %s\n", filename);
+ LOG_WARNF("^1Can't write DB to %s\n", filename);
return;
}
fputs(fh, strcat(ftos(DB_BUCKETS), "\n"));
{
switch (status) {
default: {
- LOG_WARNINGF("status: %d", status);
+ LOG_WARNF("status: %d", status);
break;
}
case URL_READY_CLOSED: break;
{
switch (status) {
default: {
- LOG_WARNINGF("status: %d", status);
+ LOG_WARNF("status: %d", status);
break;
}
case URL_READY_CLOSED: break;
}
g_buf_i--;
int expected = strlen(buf);
- if (g_buf_i > expected) LOG_WARNINGF("Underflow: %d", g_buf_i - expected);
- if (g_buf_i < expected) LOG_WARNINGF("Overrflow: %d", expected - g_buf_i);
+ if (g_buf_i > expected) LOG_WARNF("Underflow: %d", g_buf_i - expected);
+ if (g_buf_i < expected) LOG_WARNF("Overrflow: %d", expected - g_buf_i);
}
#endif
if (fieldname == "") continue; \
FIELDS_COMMON(_spawnfunc_check) \
whitelist(_spawnfunc_check) \
- LOG_WARNINGF(_("Entity field %s.%s (%s) is not whitelisted. If you believe this is an error, please file an issue.\n"), #id, fieldname, value); \
+ LOG_WARNF(_("Entity field %s.%s (%s) is not whitelisted. If you believe this is an error, please file an issue.\n"), #id, fieldname, value); \
} \
this.spawnfunc_checked = true; \
} \
#define SUCCEED() (TEST_ok = true)
/** Add a failure, but continue */
-#define ADD_FAILURE(msg) MACRO_BEGIN { ++TEST_failed; LOG_WARNINGF(msg); } MACRO_END
+#define ADD_FAILURE(msg) MACRO_BEGIN { ++TEST_failed; LOG_WARNF(msg); } MACRO_END
/** Add a failure and return */
#define FAIL(msg) _TEST_ASSERT(ADD_FAILURE(msg))
#define EXPECT_NO_FATAL_FAILURE_(statement, then) \
EXPECT_NO_FATAL_FAILURE__(statement, { \
- LOG_WARNINGF( \
+ LOG_WARNF( \
" Actual: %d fatal failures\n" \
"Expected: no fatal failures\n", \
TEST_fatal - TEST_prevfatal \
{
if(gameover)
return 0;
- LOG_WARNING("Adding score to unknown player!");
+ LOG_WARN("Adding score to unknown player!");
return 0;
}
if(score)
switch (this.state)
{
default:
- LOG_WARNINGF("unhandled weaponentity (%i) state for player (%i): %d\n", this, actor, this.state);
+ LOG_WARNF("unhandled weaponentity (%i) state for player (%i): %d\n", this, actor, this.state);
break;
case WS_INUSE:
case WS_RAISE: