/* Copyright (C) 2006 Paul Davis Written by Tim Mayberry This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GTKARDOUR_DEBUG_HEADER #define GTKARDOUR_DEBUG_HEADER #if defined(NDEBUG) || defined(GTKARDOUR_NDEBUG) // Don't define GTKARDOUR_DEBUG #else #define GTKARDOUR_DEBUG #endif /* * If DEBUG is not defined, then do absolutely nothing. */ #ifdef GTKARDOUR_DEBUG #include "log_domain.h" #if defined(NDEBUG_THREADS) || defined(GTKARDOUR_NDEBUG_THREADS) // don't generate thread debugging information. #else #define GTKARDOUR_DEBUG_THREADS #endif /* * If GTKARDOUR_DEBUG_THREADS is defined then use the ThreadLog * class for logging, otherwise use a normal VerboseLog */ #ifdef GTKARDOUR_DEBUG_THREADS #include #include #define GTKARDOUR_LOG_TYPE PBD::ThreadLog #else #include #define GTKARDOUR_LOG_TYPE PBD::VerboseLog #endif /* * Define the default log types available when GTKARDOUR_DEBUG is * defined/enabled. */ #define LOG_GTKARDOUR_ERROR GTKARDOUR_LOG_TYPE(GtkArdour::log_domain, PBD::ERROR, G_STRLOC, G_STRFUNC, true) #define LOG_GTKARDOUR_CRITICAL GTKARDOUR_LOG_TYPE(GtkArdour::log_domain, PBD::CRITICAL, G_STRLOC, G_STRFUNC) #define LOG_GTKARDOUR_WARNING GTKARDOUR_LOG_TYPE(GtkArdour::log_domain, PBD::WARNING, G_STRLOC, G_STRFUNC) #if defined(NDEBUG_EXTRA) || defined(GTKARDOUR_NDEBUG_EXTRA) // don't generate extra debugging information #else #define GTKARDOUR_DEBUG_EXTRA #endif /* * Define the Log for extra debugging output */ #ifdef GTKARDOUR_DEBUG_EXTRA #define LOG_GTKARDOUR_DEBUG GTKARDOUR_LOG_TYPE(GtkArdour::log_domain, PBD::DEBUG, G_STRLOC, G_STRFUNC) #endif #endif // GTKARDOUR_DEBUG #endif // GTKARDOUR_DEBUG_HEADER