X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=include%2Flog.h;h=e9ee8e4967ffc65262b2595baf77a8721490024f;hb=e6cadc10b7dfba48247876ad8d99e86de84d4ef4;hp=e87e38ad643aa57ce06dd54cc73ef20d5caf7499;hpb=dafd72419a43e2b5a0243d4b61372ca83747883f;p=connman diff --git a/include/log.h b/include/log.h index e87e38a..e9ee8e4 100644 --- a/include/log.h +++ b/include/log.h @@ -2,7 +2,7 @@ * * Connection Manager * - * Copyright (C) 2007 Intel Corporation. All rights reserved. + * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -26,12 +26,26 @@ extern "C" { #endif -#define DBG(fmt, arg...) connman_debug(fmt, ## arg) +/** + * SECTION:log + * @title: Logging premitives + * @short_description: Functions for logging error and debug information + */ extern void connman_info(const char *format, ...); extern void connman_error(const char *format, ...); extern void connman_debug(const char *format, ...); +/** + * DBG: + * @fmt: format string + * @arg...: list of arguments + * + * Simple macro around connman_debug() which also include the function + * name it is called in. + */ +#define DBG(fmt, arg...) connman_debug("%s:%s() " fmt, __FILE__, __FUNCTION__ , ## arg) + #ifdef __cplusplus } #endif