diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2012-08-17 01:15:45 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2012-08-23 14:37:20 +0200 |
commit | ba309e0da5bd22f844dbfc284c1606ca413f79f7 (patch) | |
tree | d24fcfb96b008d46d5908f99a0c63e066698e7eb /libdaemon/server/daemon-log.h | |
parent | b0b507b197588a25698cd876673f722b97bd18d8 (diff) | |
download | lvm2-ba309e0da5bd22f844dbfc284c1606ca413f79f7.tar.gz lvm2-ba309e0da5bd22f844dbfc284c1606ca413f79f7.tar.xz lvm2-ba309e0da5bd22f844dbfc284c1606ca413f79f7.zip |
cleanup: add standard GPL file header
Add FIXME about DEBUG define colission.
Diffstat (limited to 'libdaemon/server/daemon-log.h')
-rw-r--r-- | libdaemon/server/daemon-log.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/libdaemon/server/daemon-log.h b/libdaemon/server/daemon-log.h index 17d80076..f09fc2a5 100644 --- a/libdaemon/server/daemon-log.h +++ b/libdaemon/server/daemon-log.h @@ -1,14 +1,38 @@ +/* + * Copyright (C) 2012 Red Hat, Inc. + * + * This file is part of LVM2. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License v.2.1. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _LVM_DAEMON_LOG_H +#define _LVM_DAEMON_LOG_H + enum { DAEMON_LOG_FATAL = 0 /* usually preceding daemon death */ , DAEMON_LOG_ERROR = 1 /* something serious has happened */ , DAEMON_LOG_WARN = 2 /* something unusual has happened */ , DAEMON_LOG_INFO = 3 /* thought you might be interested */ , DAEMON_LOG_WIRE = 4 /* dump traffic on client sockets */ , DAEMON_LOG_DEBUG = 5 /* unsorted debug stuff */ - }; +}; +/* + * FIXME: We are currently compiling with -DDEBUG + * so this define DEBUG collision needs fixing + */ +#undef DEBUG #define DEBUG(s, x...) daemon_logf((s)->log, DAEMON_LOG_DEBUG, x) #define DEBUG_cft(s, i, n) daemon_log_cft((s)->log, DAEMON_LOG_DEBUG, i, n) #define WARN(s, x...) daemon_logf((s)->log, DAEMON_LOG_WARN, x) #define INFO(s, x...) daemon_logf((s)->log, DAEMON_LOG_INFO, x) #define ERROR(s, x...) daemon_logf((s)->log, DAEMON_LOG_ERROR, x) #define FATAL(s, x...) daemon_logf((s)->log, DAEMON_LOG_FATAL, x) + +#endif |