mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 17:45:41 +02:00
Automatically rename log file when crashing, added backtrace to log file
This commit is contained in:
@@ -4,7 +4,7 @@ WeeChat - Wee Enhanced Environment for Chat
|
||||
ChangeLog - 2006-05-20
|
||||
|
||||
Version 0.1.9 (under dev!):
|
||||
* added backtrace when WeeChat crashes
|
||||
* added backtrace when WeeChat crashes, log file automatically renamed
|
||||
* added lock for log file (~/.weechat/weechat.log), only one WeeChat
|
||||
process can use this file (bug #16382)
|
||||
* fixed crash with malformed UTF-8 strings
|
||||
|
||||
+41
-14
File diff suppressed because it is too large
Load Diff
+99
-20
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -21,11 +21,12 @@
|
||||
#ifndef __WEECHAT_LOG_H
|
||||
#define __WEECHAT_LOG_H 1
|
||||
|
||||
extern char *weechat_log_filename;
|
||||
extern FILE *weechat_log_file;
|
||||
|
||||
extern void weechat_log_init ();
|
||||
extern void weechat_log_close ();
|
||||
extern void weechat_log_printf (char *, ...);
|
||||
extern void weechat_log_crash_rename ();
|
||||
extern int weechat_log_crash_rename ();
|
||||
|
||||
#endif /* log.h */
|
||||
|
||||
@@ -1003,20 +1003,19 @@ weechat_sigsegv ()
|
||||
fprintf (stderr, "*** Very bad! WeeChat is crashing (SIGSEGV received)\n");
|
||||
fprintf (stderr, "*** (%s, compiled on %s %s)\n",
|
||||
PACKAGE_STRING, __DATE__, __TIME__);
|
||||
fprintf (stderr, "*** Full crash dump was saved to %s/weechat.log file.\n",
|
||||
weechat_home);
|
||||
if (!weechat_log_crash_rename ())
|
||||
fprintf (stderr, "*** Full crash dump was saved to %s/weechat.log file.\n",
|
||||
weechat_home);
|
||||
fprintf (stderr, "***\n");
|
||||
fprintf (stderr, "*** Please help WeeChat developers to fix this bug:\n");
|
||||
fprintf (stderr, "*** 1. If you have a core file, please run: gdb weechat-curses core\n");
|
||||
fprintf (stderr, "*** then issue \"bt\" command and send result to developers\n");
|
||||
fprintf (stderr, "*** To enable core files with bash shell: ulimit -c 10000\n");
|
||||
fprintf (stderr, "*** 2. Otherwise send backtrace displayed below and weechat.log\n");
|
||||
fprintf (stderr, "*** 2. Otherwise send backtrace (below) and weechat.log\n");
|
||||
fprintf (stderr, "*** (be careful, private info may be in this file since\n");
|
||||
fprintf (stderr, "*** part of chats are displayed, so remove lines if needed)\n\n");
|
||||
|
||||
fprintf (stderr, "======= WeeChat backtrace =======\n");
|
||||
weechat_backtrace ();
|
||||
fprintf (stderr, "======= End of backtrace =======\n");
|
||||
|
||||
/* shutdown with error code */
|
||||
weechat_shutdown (EXIT_FAILURE, 1);
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ WeeChat - Wee Enhanced Environment for Chat
|
||||
ChangeLog - 2006-05-20
|
||||
|
||||
Version 0.1.9 (under dev!):
|
||||
* added backtrace when WeeChat crashes
|
||||
* added backtrace when WeeChat crashes, log file automatically renamed
|
||||
* added lock for log file (~/.weechat/weechat.log), only one WeeChat
|
||||
process can use this file (bug #16382)
|
||||
* fixed crash with malformed UTF-8 strings
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+99
-20
File diff suppressed because it is too large
Load Diff
@@ -21,11 +21,12 @@
|
||||
#ifndef __WEECHAT_LOG_H
|
||||
#define __WEECHAT_LOG_H 1
|
||||
|
||||
extern char *weechat_log_filename;
|
||||
extern FILE *weechat_log_file;
|
||||
|
||||
extern void weechat_log_init ();
|
||||
extern void weechat_log_close ();
|
||||
extern void weechat_log_printf (char *, ...);
|
||||
extern void weechat_log_crash_rename ();
|
||||
extern int weechat_log_crash_rename ();
|
||||
|
||||
#endif /* log.h */
|
||||
|
||||
@@ -1003,20 +1003,19 @@ weechat_sigsegv ()
|
||||
fprintf (stderr, "*** Very bad! WeeChat is crashing (SIGSEGV received)\n");
|
||||
fprintf (stderr, "*** (%s, compiled on %s %s)\n",
|
||||
PACKAGE_STRING, __DATE__, __TIME__);
|
||||
fprintf (stderr, "*** Full crash dump was saved to %s/weechat.log file.\n",
|
||||
weechat_home);
|
||||
if (!weechat_log_crash_rename ())
|
||||
fprintf (stderr, "*** Full crash dump was saved to %s/weechat.log file.\n",
|
||||
weechat_home);
|
||||
fprintf (stderr, "***\n");
|
||||
fprintf (stderr, "*** Please help WeeChat developers to fix this bug:\n");
|
||||
fprintf (stderr, "*** 1. If you have a core file, please run: gdb weechat-curses core\n");
|
||||
fprintf (stderr, "*** then issue \"bt\" command and send result to developers\n");
|
||||
fprintf (stderr, "*** To enable core files with bash shell: ulimit -c 10000\n");
|
||||
fprintf (stderr, "*** 2. Otherwise send backtrace displayed below and weechat.log\n");
|
||||
fprintf (stderr, "*** 2. Otherwise send backtrace (below) and weechat.log\n");
|
||||
fprintf (stderr, "*** (be careful, private info may be in this file since\n");
|
||||
fprintf (stderr, "*** part of chats are displayed, so remove lines if needed)\n\n");
|
||||
|
||||
fprintf (stderr, "======= WeeChat backtrace =======\n");
|
||||
weechat_backtrace ();
|
||||
fprintf (stderr, "======= End of backtrace =======\n");
|
||||
|
||||
/* shutdown with error code */
|
||||
weechat_shutdown (EXIT_FAILURE, 1);
|
||||
|
||||
Reference in New Issue
Block a user