mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
logs: replace every fmt::print with a lg call instead (#1368)
Favors the `lg` namespace over `fmt` directly, as this will output the logs to a file / has log levels. I also made assertion errors go to a file, this unfortunately means importing `lg` and hence `fmt` which was attempted to be avoided before. But I'm not sure how else to do this aspect without re-inventing the file logging. We have a lot of commented out prints as well that we should probably cleanup at some point / switch them to trace level and default to `info` level. I noticed the pattern of disabling debug logs behind some boolean, something to consider cleaning up in the future -- if our logs were more structured (knowing where they are coming from) then a lot this boilerplate could be eliminated. Closes #1358
This commit is contained in:
@@ -119,14 +119,14 @@ FormElement* SetVarOp::get_as_form(FormPool& pool, const Env& env) const {
|
||||
menv->disable_use(src_var);
|
||||
}
|
||||
|
||||
// fmt::print("marked {} as dead set\n", to_string(env));
|
||||
// lg::print("marked {} as dead set\n", to_string(env));
|
||||
}
|
||||
} else if (m_src.get_arg(0).is_sym_val() && m_src.get_arg(0).get_str() == "#f" &&
|
||||
m_dst.reg().allowed_local_gpr()) {
|
||||
auto& ri = env.reg_use().op.at(m_my_idx);
|
||||
if (ri.written_and_unused.find(dst().reg()) != ri.written_and_unused.end()) {
|
||||
result->mark_as_dead_false();
|
||||
// fmt::print("marked {} as dead set false\n", to_string(env));
|
||||
// lg::print("marked {} as dead set false\n", to_string(env));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user