Splitting logging core into poly.

This commit is contained in:
Ben Vanik
2014-08-21 20:26:55 -07:00
parent 08b0226a16
commit e1b0388faf
19 changed files with 194 additions and 144 deletions

View File

@@ -25,13 +25,12 @@ using xdb::PostmortemDebugTarget;
int main(std::vector<std::wstring>& args) {
auto left_target = std::make_unique<PostmortemDebugTarget>();
if (!left_target->LoadTrace(poly::to_wstring(FLAGS_trace_file_left))) {
XEFATAL("Unable to load left trace file: %s",
FLAGS_trace_file_left.c_str());
PFATAL("Unable to load left trace file: %s", FLAGS_trace_file_left.c_str());
}
auto right_target = std::make_unique<PostmortemDebugTarget>();
if (!right_target->LoadTrace(poly::to_wstring(FLAGS_trace_file_right))) {
XEFATAL("Unable to load right trace file: %s",
FLAGS_trace_file_right.c_str());
PFATAL("Unable to load right trace file: %s",
FLAGS_trace_file_right.c_str());
}
return 0;

View File

@@ -26,7 +26,7 @@ namespace xdb {
int main(std::vector<std::wstring>& args) {
wxInitializer init;
if (!init.IsOk()) {
XEFATAL("Failed to initialize wxWidgets");
PFATAL("Failed to initialize wxWidgets");
return 1;
}
@@ -34,18 +34,18 @@ int main(std::vector<std::wstring>& args) {
auto app = new ui::XdbApp();
wxApp::SetInstance(app);
if (!wxEntryStart(0, nullptr)) {
XEFATAL("Failed to enter wxWidgets app");
PFATAL("Failed to enter wxWidgets app");
return 1;
}
if (!app->OnInit()) {
XEFATAL("Failed to init app");
PFATAL("Failed to init app");
return 1;
}
if (!FLAGS_trace_file.empty()) {
// Trace file specified on command line.
if (!app->OpenTraceFile(FLAGS_trace_file, FLAGS_content_file)) {
XEFATAL("Failed to open trace file");
PFATAL("Failed to open trace file");
return 1;
}
} else {

View File

@@ -23,7 +23,7 @@ int xenia_run(std::vector<std::wstring>& args) {
// Grab path from the flag or unnamed argument.
if (!FLAGS_target.size() && args.size() < 2) {
google::ShowUsageWithFlags("xenia-run");
XEFATAL("Pass a file to launch.");
PFATAL("Pass a file to launch.");
return 1;
}
std::wstring path;