~ubuntu-branches/debian/sid/lvm2/sid

« back to all changes in this revision

Viewing changes to libdaemon/server/daemon-log.h

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2013-03-03 12:33:47 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20130303123347-smfwei6dodkdth55
Tags: 2.02.98-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2012 Red Hat, Inc.
 
3
 *
 
4
 * This file is part of LVM2.
 
5
 *
 
6
 * This copyrighted material is made available to anyone wishing to use,
 
7
 * modify, copy, or redistribute it subject to the terms and conditions
 
8
 * of the GNU Lesser General Public License v.2.1.
 
9
 *
 
10
 * You should have received a copy of the GNU Lesser General Public License
 
11
 * along with this program; if not, write to the Free Software Foundation,
 
12
 * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
13
 */
 
14
 
 
15
#ifndef _LVM_DAEMON_LOG_H
 
16
#define _LVM_DAEMON_LOG_H
 
17
 
 
18
enum { DAEMON_LOG_FATAL = 0 /* usually preceding daemon death */
 
19
     , DAEMON_LOG_ERROR = 1 /* something serious has happened */
 
20
     , DAEMON_LOG_WARN = 2 /* something unusual has happened */
 
21
     , DAEMON_LOG_INFO = 3 /* thought you might be interested */
 
22
     , DAEMON_LOG_WIRE = 4 /* dump traffic on client sockets */
 
23
     , DAEMON_LOG_DEBUG = 5 /* unsorted debug stuff */
 
24
};
 
25
 
 
26
#define DEBUGLOG(s, x...) daemon_logf((s)->log, DAEMON_LOG_DEBUG, x)
 
27
#define DEBUGLOG_cft(s, i, n) daemon_log_cft((s)->log, DAEMON_LOG_DEBUG, i, n)
 
28
#define WARN(s, x...) daemon_logf((s)->log, DAEMON_LOG_WARN, x)
 
29
#define INFO(s, x...) daemon_logf((s)->log, DAEMON_LOG_INFO, x)
 
30
#define ERROR(s, x...) daemon_logf((s)->log, DAEMON_LOG_ERROR, x)
 
31
#define FATAL(s, x...) daemon_logf((s)->log, DAEMON_LOG_FATAL, x)
 
32
 
 
33
#endif