* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file lib/log.h
+ * @brief Errors and logging
+ */
#ifndef LOG_H
#define LOG_H
void elog(int pri, int errno_value, const char *fmt, va_list ap);
-void fatal(int errno_value, const char *msg, ...) attribute((noreturn))
+void disorder_fatal(int errno_value, const char *msg, ...) attribute((noreturn))
attribute((format (printf, 2, 3)));
-void error(int errno_value, const char *msg, ...)
+void disorder_error(int errno_value, const char *msg, ...)
attribute((format (printf, 2, 3)));
-void info(const char *msg, ...)
+void disorder_info(const char *msg, ...)
attribute((format (printf, 1, 2)));
-void debug(const char *msg, ...)
+void disorder_debug(const char *msg, ...)
attribute((format (printf, 1, 2)));
/* report a message of the given class. @errno_value@ if present an
* non-zero is included. @fatal@ terminates the process. */
+/** @brief Backward-compatibility alias for disorder_fatal() */
+#define fatal disorder_fatal
+
+/** @brief Backward-compatibility alias for disorder_error() */
+#define error disorder_error
+
+/** @brief Backward-compatibility alias for disorder_info() */
+#define info disorder_info
+
+/** @brief Backward-compatibility alias for disorder_debug() */
+#define debug disorder_debug
+
extern int debugging;
/* set when debugging enabled */