From a02edaebd3694fdc5fd901c6323f1cf8295dab10 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Wed, 12 Dec 2012 13:41:33 -0500 Subject: [PATCH] remove full path from error messages --- src/error_report.cpp | 4 ++-- src/log.cpp | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/error_report.cpp b/src/error_report.cpp index 577543d..44a78c7 100644 --- a/src/error_report.cpp +++ b/src/error_report.cpp @@ -1,9 +1,9 @@ #include - +#include namespace fc { error_frame::error_frame( const fc::string& f, uint64_t l, const fc::string& m, const fc::string& d, fc::value met ) -:desc(d),file(f),line(l),method(m),meta(fc::move(met)){} +:desc(d),file(fc::path(f).filename().generic_string()),line(l),method(m),meta(fc::move(met)){} error_report::error_report() { diff --git a/src/log.cpp b/src/log.cpp index f731119..199190d 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -8,12 +8,14 @@ #include #endif +#include #include namespace fc { const char* thread_name(); void* thread_ptr(); + /* const char* short_name( const char* file_name ) { const char* end = file_name + strlen(file_name); --end; @@ -25,6 +27,7 @@ namespace fc { } return file_name; } + */ #ifdef WIN32 #define isatty _isatty @@ -39,7 +42,7 @@ namespace fc { std::cerr<<"\r"<