Skip to content
Snippets Groups Projects
Commit 768b62ef authored by Mohammed Sadiq's avatar Mohammed Sadiq
Browse files

main: Log stack traces only on verbose log

parent 250f4b03
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,14 @@
static void
show_backtrace (int signum)
{
g_on_error_stack_trace (g_get_prgname ());
/* Log only if we have set some verbosity so that the trace
* shall be shown only if the user have explicitly asked for.
* Thus avoid logging sensitive information to system log
* without user's knowledge.
*/
if (chatty_log_get_verbosity () > 0)
g_on_error_stack_trace (g_get_prgname ());
g_print ("signum %d: %s\n", signum, g_strsignal (signum));
exit (128 + signum);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment