From: TimePath Date: Sun, 7 Aug 2016 11:09:32 +0000 (+1000) Subject: s/LOG_WARNING/LOG_WARN/g X-Git-Tag: xonotic-v0.8.2~740 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8adaf5cf95a9edb47386fff7d7d75eade98c8a70;p=xonotic%2Fxonotic-data.pk3dir.git s/LOG_WARNING/LOG_WARN/g --- diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index 4cb5c9fd4..470701966 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -156,7 +156,7 @@ bool QuickMenu_Open(string mode, string submenu) } else { - LOG_WARNINGF("Unrecognized mode %s\n", mode); + LOG_WARNF("Unrecognized mode %s\n", mode); return false; } @@ -292,7 +292,7 @@ bool QuickMenu_Page_Load(string target_submenu, bool new_page) // 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 @@ -866,9 +866,9 @@ void QuickMenu_Default(string target_submenu) 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; } } diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 7af598654..402116173 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -879,7 +879,7 @@ void CSQC_Ent_Remove(entity this) 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); diff --git a/qcsrc/common/effects/effectinfo.qc b/qcsrc/common/effects/effectinfo.qc index 07d76c480..67312d905 100644 --- a/qcsrc/common/effects/effectinfo.qc +++ b/qcsrc/common/effects/effectinfo.qc @@ -253,7 +253,7 @@ void effectinfo_read() #undef p #undef MY default: - LOG_WARNINGF("Unknown property '%s'\n", k); + LOG_WARNF("Unknown property '%s'\n", k); break; } } @@ -306,7 +306,7 @@ GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt") 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; } diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index 8c1ed1ca8..c2fa827fa 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -114,7 +114,7 @@ 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; @@ -146,7 +146,7 @@ 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; @@ -219,7 +219,7 @@ 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)); ) @@ -227,7 +227,7 @@ 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); @@ -261,7 +261,7 @@ 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)); ) @@ -269,7 +269,7 @@ 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); diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 13e4185bc..a63f6613b 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -1345,7 +1345,7 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn 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); diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 52ee1bd9c..34fa0ee35 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -2,8 +2,8 @@ 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" diff --git a/qcsrc/common/models/model.qh b/qcsrc/common/models/model.qh index f651b709e..1610240a7 100644 --- a/qcsrc/common/models/model.qh +++ b/qcsrc/common/models/model.qh @@ -15,7 +15,7 @@ CLASS(Model, Object) 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)); diff --git a/qcsrc/common/mutators/base.qh b/qcsrc/common/mutators/base.qh index c1f7501c9..a6e367178 100644 --- a/qcsrc/common/mutators/base.qh +++ b/qcsrc/common/mutators/base.qh @@ -203,7 +203,7 @@ NET_HANDLE(Mutator, bool isNew) 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 diff --git a/qcsrc/common/notifications/all.qc b/qcsrc/common/notifications/all.qc index d1aa1dbf9..2b3dbdfbe 100644 --- a/qcsrc/common/notifications/all.qc +++ b/qcsrc/common/notifications/all.qc @@ -572,7 +572,7 @@ void Create_Notification_Entity_InfoCenter(entity notif, } else if(icon != "") { - LOG_WARNINGF( + LOG_WARNF( ( "^1NOTIFICATION HAS ICON BUT NO HUDARGS: " "^7net_type = %s, net_name = %s.\n" @@ -589,7 +589,7 @@ void Create_Notification_Entity_InfoCenter(entity notif, if (cpid == CPID_Null && durcnt != "0 0") { - LOG_WARNINGF( + LOG_WARNF( ( "Notification has durcnt but no cpid: " "net_type = %s, net_name = %s." @@ -1210,7 +1210,7 @@ void Local_Notification(MSG net_type, Notification net_name, ...count) 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; } @@ -1523,7 +1523,7 @@ void Kill_Notification( #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; @@ -1561,7 +1561,7 @@ void Send_Notification( if (!notif) { - LOG_WARNING("Send_Notification: Could not find notification entity!"); + LOG_WARN("Send_Notification: Could not find notification entity!"); return; } @@ -1570,7 +1570,7 @@ void Send_Notification( 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; } @@ -1594,7 +1594,7 @@ void Send_Notification( 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", diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index f364225b3..c7b1ec8fc 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -32,7 +32,7 @@ string Get_Notif_TypeName(MSG net_type) 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 ""; } @@ -252,7 +252,7 @@ string Get_Notif_BroadcastName(NOTIF broadcast) 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 ""; } @@ -684,7 +684,7 @@ Notification Get_Notif_Ent(MSG net_type, int net_name) { 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) diff --git a/qcsrc/common/sounds/sound.qh b/qcsrc/common/sounds/sound.qh index b2cca4fee..73442509c 100644 --- a/qcsrc/common/sounds/sound.qh +++ b/qcsrc/common/sounds/sound.qh @@ -114,7 +114,7 @@ CLASS(Sound, Object) /**/ #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; diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index ea949da50..d4479dac7 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -462,7 +462,7 @@ void CL_WeaponEntity_SetModel(entity this, string name, bool _anim) } 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'; } @@ -481,7 +481,7 @@ void CL_WeaponEntity_SetModel(entity this, string name, bool _anim) } 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; } @@ -503,7 +503,7 @@ void CL_WeaponEntity_SetModel(entity this, string name, bool _anim) } 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", diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index 401e4e205..b950a8f03 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -378,7 +378,7 @@ METHOD(PortoLaunch, wr_resetplayer, void(entity thiswep, entity actor)) #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 diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index 6d8182aab..1fba375eb 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -643,7 +643,7 @@ PRECACHE(Tuba) 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; } } diff --git a/qcsrc/lib/_all.inc b/qcsrc/lib/_all.inc index f52c9a3c7..83a0ebf34 100644 --- a/qcsrc/lib/_all.inc +++ b/qcsrc/lib/_all.inc @@ -55,7 +55,7 @@ #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 @@ -132,12 +132,12 @@ void make_safe_for_remove(entity this); #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 diff --git a/qcsrc/lib/intrusivelist.qh b/qcsrc/lib/intrusivelist.qh index 10de3e963..014f3a169 100644 --- a/qcsrc/lib/intrusivelist.qh +++ b/qcsrc/lib/intrusivelist.qh @@ -204,7 +204,7 @@ void IL_INIT(IntrusiveList this) return; } } - LOG_WARNINGF("IntrusiveList overflow"); + LOG_WARNF("IntrusiveList overflow"); } void IL_DTOR(IntrusiveList this) diff --git a/qcsrc/lib/log.qh b/qcsrc/lib/log.qh index a8874adbd..a25dd0f48 100644 --- a/qcsrc/lib/log.qh +++ b/qcsrc/lib/log.qh @@ -53,9 +53,9 @@ string(string...) strcat0n = #115; #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__)) diff --git a/qcsrc/lib/map.qh b/qcsrc/lib/map.qh index 57b8f8c67..8a796c02d 100644 --- a/qcsrc/lib/map.qh +++ b/qcsrc/lib/map.qh @@ -9,7 +9,7 @@ void db_save(int db, string filename) 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")); diff --git a/qcsrc/lib/matrix/matrix.qc b/qcsrc/lib/matrix/matrix.qc index db51bbffa..c399c2aa6 100644 --- a/qcsrc/lib/matrix/matrix.qc +++ b/qcsrc/lib/matrix/matrix.qc @@ -46,7 +46,7 @@ void MX_Messages_(entity fh, entity pass, int status) { switch (status) { default: { - LOG_WARNINGF("status: %d", status); + LOG_WARNF("status: %d", status); break; } case URL_READY_CLOSED: break; @@ -90,7 +90,7 @@ void MX_Sync_(entity fh, entity pass, int status) { switch (status) { default: { - LOG_WARNINGF("status: %d", status); + LOG_WARNF("status: %d", status); break; } case URL_READY_CLOSED: break; diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index 7cb9bb896..4c9d9e6e1 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -161,8 +161,8 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); } } 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 diff --git a/qcsrc/lib/spawnfunc.qh b/qcsrc/lib/spawnfunc.qh index 7acf965a8..31e20f22f 100644 --- a/qcsrc/lib/spawnfunc.qh +++ b/qcsrc/lib/spawnfunc.qh @@ -62,7 +62,7 @@ noref bool require_spawnfunc_prefix; 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; \ } \ diff --git a/qcsrc/lib/test.qh b/qcsrc/lib/test.qh index d05ae28cd..05bd63d3c 100644 --- a/qcsrc/lib/test.qh +++ b/qcsrc/lib/test.qh @@ -15,7 +15,7 @@ #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)) @@ -87,7 +87,7 @@ int TEST_failed; #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 \ diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index f517aeaf3..e3d5fd9d7 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -333,7 +333,7 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score) { if(gameover) return 0; - LOG_WARNING("Adding score to unknown player!"); + LOG_WARN("Adding score to unknown player!"); return 0; } if(score) diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 3f372371b..22fd70a2e 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -459,7 +459,7 @@ void W_WeaponFrame(Player actor) 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: