/*
- * logging.h
+ * simple logging functions that can be expanded into nothing
*
- * Simple logging functions that can be compiled away into nothing.
- *
- * Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
- * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
+ * Copyright (C) 2004-2006 Kay Sievers <kay.sievers@vrfy.org>
*
* 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
*
* 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#undef err
#define err(format, arg...) \
do { \
- log_message(LOG_INFO ,"%s: " format ,__FILE__ ,## arg); \
+ log_message(LOG_ERR ,"%s: " format ,__FUNCTION__ ,## arg); \
} while (0)
#undef info
#define info(format, arg...) \
do { \
- log_message(LOG_INFO ,"%s: " format ,__FILE__ ,## arg); \
+ log_message(LOG_INFO ,"%s: " format ,__FUNCTION__ ,## arg); \
} while (0)
#ifdef DEBUG
#undef logging_init
static inline void logging_init(const char *program_name)
{
- openlog(program_name, LOG_PID, LOG_DAEMON);
+ openlog(program_name, LOG_PID | LOG_CONS, LOG_DAEMON);
}
#undef logging_close