X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Flog.h;h=d154ba7c709651353b30e0d1110094decd18aa1e;hb=b374f6d47e4953aa20795ac6b5ba2709dab382cf;hp=8a0b5a5279a3b85e2ec1a1fd1144248831a84fc8;hpb=e7fcf53b8b53c0e69996d8881713694b8c48f016;p=platform%2Fupstream%2Fconnman.git diff --git a/include/log.h b/include/log.h index 8a0b5a5..d154ba7 100644 --- a/include/log.h +++ b/include/log.h @@ -2,7 +2,7 @@ * * Connection Manager * - * Copyright (C) 2007-2008 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,10 +26,27 @@ extern "C" { #endif -extern void connman_info(const char *format, ...); -extern void connman_error(const char *format, ...); -extern void connman_debug(const char *format, ...); +/** + * SECTION:log + * @title: Logging premitives + * @short_description: Functions for logging error and debug information + */ + +extern void connman_info(const char *format, ...) + __attribute__((format(printf, 1, 2))); +extern void connman_error(const char *format, ...) + __attribute__((format(printf, 1, 2))); +extern void connman_debug(const char *format, ...) + __attribute__((format(printf, 1, 2))); +/** + * 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