forked from github/server
Bug 2576: additional logging.
increase log verbosity, decrease some log levels.
This commit is contained in:
parent
17484e220f
commit
c92f7505e5
5 changed files with 21 additions and 12 deletions
|
@ -27,11 +27,21 @@ end
|
||||||
local function tunnel_action(b, param)
|
local function tunnel_action(b, param)
|
||||||
local units = tunnel_travelers(b)
|
local units = tunnel_travelers(b)
|
||||||
local rto = get_target(param)
|
local rto = get_target(param)
|
||||||
|
eressea.log.info("Tunnel from " .. tostring(b) .. " [" .. param .. "]")
|
||||||
if rto and units then
|
if rto and units then
|
||||||
eressea.log.debug("Tunnel from " .. tostring(b) .. " [" .. param .. "]")
|
for _, u in pairs(units) do
|
||||||
for key, u in pairs(units) do
|
|
||||||
u.region = rto
|
u.region = rto
|
||||||
eressea.log.debug("teleported " .. tostring(u) .. " to " .. tostring(rto))
|
eressea.log.info("teleported " .. tostring(u) .. " to " .. tostring(rto))
|
||||||
|
end
|
||||||
|
elseif not units then
|
||||||
|
eressea.log.info("No units in tunnel " .. tostring(b) .. " [" .. param .. "]")
|
||||||
|
elseif not rto then
|
||||||
|
eressea.log.error("No target for tunnel " .. tostring(b) .. " [" .. param .. "]")
|
||||||
|
end
|
||||||
|
-- debug code to find bugs:
|
||||||
|
for u in b.region.units do
|
||||||
|
if u.building == b then
|
||||||
|
eressea.log.error("Did not teleport " .. tostring(u) .. " from tunnel " .. tostring(b))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -848,13 +848,12 @@ void cr_output_unit(stream *out, const faction * f,
|
||||||
|
|
||||||
pzTmp = get_racename(u->attribs);
|
pzTmp = get_racename(u->attribs);
|
||||||
if (pzTmp) {
|
if (pzTmp) {
|
||||||
const char *pzRace = LOC(lang, mkname("race", pzTmp));
|
const char *pzRace = locale_string(lang, mkname("race", pzTmp), false);
|
||||||
pzTmp = pzRace ? pzRace : pzTmp;
|
pzTmp = pzRace ? translate(pzRace, LOC(lang, pzRace)) : pzTmp;
|
||||||
stream_printf(out, "\"%s\";Typ\n", translate(pzTmp, LOC(lang, pzTmp)));
|
stream_printf(out, "\"%s\";Typ\n", pzTmp);
|
||||||
if (u->faction == f && fval(u_race(u), RCF_SHAPESHIFTANY)) {
|
if (u->faction == f && fval(u_race(u), RCF_SHAPESHIFTANY)) {
|
||||||
pzRace = rc_name_s(u_race(u), NAME_PLURAL);
|
pzRace = rc_name_s(u_race(u), NAME_PLURAL);
|
||||||
stream_printf(out, "\"%s\";wahrerTyp\n",
|
stream_printf(out, "\"%s\";wahrerTyp\n", pzTmp);
|
||||||
translate(pzRace, LOC(lang, pzRace)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -2237,7 +2237,7 @@ static void equip_familiar(unit *fam) {
|
||||||
|
|
||||||
snprintf(eqname, sizeof(eqname), "fam_%s", rc->_name);
|
snprintf(eqname, sizeof(eqname), "fam_%s", rc->_name);
|
||||||
if (!equip_unit(fam, eqname)) {
|
if (!equip_unit(fam, eqname)) {
|
||||||
log_info("could not perform initialization for familiar %s.\n", rc->_name);
|
log_debug("could not perform initialization for familiar %s.\n", rc->_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ static const char *logfile = "eressea.log";
|
||||||
static const char *luafile = 0;
|
static const char *luafile = 0;
|
||||||
static const char *inifile = "eressea.ini";
|
static const char *inifile = "eressea.ini";
|
||||||
static int memdebug = 0;
|
static int memdebug = 0;
|
||||||
static int verbosity = 1;
|
static int verbosity = 2;
|
||||||
|
|
||||||
static void load_inifile(void)
|
static void load_inifile(void)
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,7 @@ static int verbosity_to_flags(int verbosity) {
|
||||||
static int parse_args(int argc, char **argv)
|
static int parse_args(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int log_stderr, log_flags = 2;
|
int log_stderr, log_flags = 3;
|
||||||
|
|
||||||
for (i = 1; i != argc; ++i) {
|
for (i = 1; i != argc; ++i) {
|
||||||
char *argi = argv[i];
|
char *argi = argv[i];
|
||||||
|
|
|
@ -715,7 +715,7 @@ void bufunit(const faction * f, const unit * u, const faction *fv,
|
||||||
|
|
||||||
pzTmp = get_racename(u->attribs);
|
pzTmp = get_racename(u->attribs);
|
||||||
if (pzTmp) {
|
if (pzTmp) {
|
||||||
const char *name = LOC(lang, mkname("race", pzTmp));
|
const char *name = locale_string(lang, mkname("race", pzTmp), false);
|
||||||
sbs_strcat(sbp, name ? name : pzTmp);
|
sbs_strcat(sbp, name ? name : pzTmp);
|
||||||
if (u->faction == f && fval(u_race(u), RCF_SHAPESHIFTANY)) {
|
if (u->faction == f && fval(u_race(u), RCF_SHAPESHIFTANY)) {
|
||||||
sbs_strcat(sbp, " (");
|
sbs_strcat(sbp, " (");
|
||||||
|
|
Loading…
Reference in a new issue