Rename crash file
This commit is contained in:
parent
39403e612f
commit
dbf5e8266b
|
@ -17,6 +17,9 @@ Makefile
|
||||||
*~
|
*~
|
||||||
*.kate-swap
|
*.kate-swap
|
||||||
CMakeLists.txt.user*
|
CMakeLists.txt.user*
|
||||||
|
items.xml
|
||||||
|
items.otb
|
||||||
|
*.log
|
||||||
/modules/myconfig.otml
|
/modules/myconfig.otml
|
||||||
/modules/myotclientrc.lua
|
/modules/myotclientrc.lua
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
|
|
@ -104,7 +104,7 @@ void crashHandler(int signum, siginfo_t* info, void* secret)
|
||||||
|
|
||||||
g_logger.info(ss.str());
|
g_logger.info(ss.str());
|
||||||
|
|
||||||
std::string fileName = "crash_report.txt";
|
std::string fileName = "crash_report.log";
|
||||||
std::ofstream fout(fileName.c_str(), std::ios::out | std::ios::app);
|
std::ofstream fout(fileName.c_str(), std::ios::out | std::ios::app);
|
||||||
if(fout.is_open() && fout.good()) {
|
if(fout.is_open() && fout.good()) {
|
||||||
fout << "== application crashed\n";
|
fout << "== application crashed\n";
|
||||||
|
|
|
@ -128,10 +128,10 @@ LONG CALLBACK ExceptionHandler(LPEXCEPTION_POINTERS e)
|
||||||
// print in stdout
|
// print in stdout
|
||||||
g_logger.info(ss.str());
|
g_logger.info(ss.str());
|
||||||
|
|
||||||
// write stacktrace to crash_report.txt
|
// write stacktrace to crashreport.log
|
||||||
char dir[MAX_PATH];
|
char dir[MAX_PATH];
|
||||||
GetCurrentDirectory(sizeof(dir) - 1, dir);
|
GetCurrentDirectory(sizeof(dir) - 1, dir);
|
||||||
std::string fileName = stdext::format("%s\\crash_report.txt", dir);
|
std::string fileName = stdext::format("%s\\crashreport.log", dir);
|
||||||
std::ofstream fout(fileName.c_str(), std::ios::out | std::ios::app);
|
std::ofstream fout(fileName.c_str(), std::ios::out | std::ios::app);
|
||||||
if(fout.is_open() && fout.good()) {
|
if(fout.is_open() && fout.good()) {
|
||||||
fout << ss.str();
|
fout << ss.str();
|
||||||
|
|
Loading…
Reference in New Issue