diff options
Diffstat (limited to 'segget/tui.cpp')
-rw-r--r-- | segget/tui.cpp | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/segget/tui.cpp b/segget/tui.cpp index fa194b6..5f4545b 100644 --- a/segget/tui.cpp +++ b/segget/tui.cpp @@ -145,86 +145,4 @@ void msg_total(string msg_text){ }catch(...){ error_log_no_msg("Error in tui.cpp: msg_total()"); } -} -void log(string log_msg_text){ - try{ - msg(LOG_LINE_NUM,0, "LOG:"+log_msg_text); - ofstream file; - file.exceptions (ofstream::failbit | ofstream::badbit); - try{ - file.open((settings.logs_dir+"/"+settings.general_log_file).c_str(), ios::app); - }catch(...){ - error_log("Error opening "+settings.logs_dir+"/"+settings.general_log_file+"."); - return; - } - try{ - file << log_msg_text << endl; - file.close(); - } - catch(...){ - error_log("Error while writing "+settings.logs_dir+"/"+settings.general_log_file+"."); - return; - } - }catch(...){ - error_log("Error in tui.cpp: log()"); - } -} -void debug(string debug_msg_text){ - try{ -// msg(DEBUG_LINE_NUM,0, "DEBUG:"+debug_msg_text); - debug_no_msg(debug_msg_text); - }catch(...){ - error_log("Error in tui.cpp: debug()"); - } -} - -void debug_no_msg(string debug_msg_text){ - try{ - ofstream file; - file.exceptions (ofstream::failbit | ofstream::badbit); - try{ - file.open((settings.logs_dir+"/"+settings.debug_log_file).c_str(), ios::app); - } - catch(...){ - error_log("Error opening "+settings.logs_dir+"/"+settings.debug_log_file+"."); - return; - } - try{ - file << debug_msg_text << endl; - file.close(); - } - catch(...){ - error_log("Error while writing "+settings.logs_dir+"/"+settings.debug_log_file+"."); - return; - } - }catch(...){ - error_log("Error in tui.cpp: debug()"); - } -} - -void error_log_no_msg(string error_msg_text){ - try{ - ofstream file ((settings.logs_dir+"/"+settings.error_log_file).c_str(), ios::app); - file << error_msg_text << endl; - file.close(); - }catch(...){ - fprintf(stderr, "Error opening error log file."); - fprintf(stderr, "Error log file: %s/%s",settings.logs_dir.c_str(),settings.error_log_file.c_str()); - } -} - -void error_log(string error_msg_text){ - try{ - ofstream file ((settings.logs_dir+"/"+settings.error_log_file).c_str(), ios::app); - file << error_msg_text << endl; - file.close(); - }catch(...){ - fprintf(stderr, "Error opening error log file."); - fprintf(stderr, "Error log file: %s/%s",settings.logs_dir.c_str(),settings.error_log_file.c_str()); - } - try{ - msg(ERROR_LINE_NUM,0, "ERROR:"+error_msg_text); - }catch(...){ - error_log_no_msg("Error in tui.cpp: error_log()"); - } }
\ No newline at end of file |