Eina log: Disable backtrace by default for dev builds

The EINA_LOG_BACKTRACE thing is aimed at production environments,
so we can extract a backtrace from a log file post-mortem, but not
for continuous development of EFL itself.

I know this should make a few people happy.
This commit is contained in:
Jean-Philippe Andre 2015-12-15 15:27:20 +09:00
parent 6bc24b4794
commit 1f75cfc3cf
2 changed files with 11 additions and 1 deletions

View File

@ -85,12 +85,17 @@ case "${build_profile}" in
esac
prefer_assert="no"
eina_log_backtrace="yes"
case "${build_profile}" in
dev|debug)
prefer_assert="yes"
eina_log_backtrace="no"
;;
esac
# Enable CRI & ERR backtrace by default for release but not for dev/debug
AC_DEFINE_IF([EINA_LOG_BACKTRACE_ENABLE], [test "x${eina_log_backtrace}" = "xyes"], [1], [Default log level triggering backtraces])
# TODO: add some build "profile" (server, full, etc...)
AC_ARG_WITH([crypto],

View File

@ -121,7 +121,12 @@ static Eina_Bool _disable_timing = EINA_TRUE;
static int _abort_level_on_critical = EINA_LOG_LEVEL_CRITICAL;
#ifdef EINA_LOG_BACKTRACE
static int _backtrace_level = 1; // CRI & ERR by default
// CRI & ERR by default in release mode, nothing in dev mode
# ifndef EINA_LOG_BACKTRACE_ENABLE
static int _backtrace_level = -1;
# else
static int _backtrace_level = 1;
# endif
#endif
static Eina_Bool _threads_enabled = EINA_FALSE;