Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

logging.H

Go to the documentation of this file.
00001 // Copyright (C) 2001, Compaq Computer Corporation
00002 // 
00003 // This file is part of Vesta.
00004 // 
00005 // Vesta is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 // 
00010 // Vesta is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with Vesta; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // Last modified on Wed Dec  8 01:34:31 EST 2004 by ken@xorian.net
00020 
00021 /*
00022  * logging.H    Definitions for the logging functions.
00023  *
00024  * Authors:     Donald J. Becker, <becker@super.org>
00025  *              Rick Sladkey, <jrs@world.std.com>
00026  *              Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
00027  *
00028  *              This software maybe be used for any purpose provided
00029  *              the above copyright notice is retained.  It is supplied
00030  *              as is, with no warranty expressed or implied.
00031  */
00032 
00033 #ifndef _LOGGING_H
00034 #define _LOGGING_H
00035 
00036 #include "nfsd.H"
00037 #include "VRErrorCode.H"
00038 
00039 /* Known debugLevel flags */
00040 #define DBG_ALWAYS     0x0000  /* Always log this message */
00041 #define DBG_SRPC       0x0001  /* SRPC - log when a client dies, etc. */
00042 #define DBG_NFS        0x0002  /* NFS interface - log arguments and results. */
00043 #define DBG_FDCACHE    0x0004  /* FdCache - log debugging messages. */
00044 #define DBG_SIDDISP    0x0008  /* doDeletions - log disposition of each sid. */
00045 #define DBG_SIDDEL     0x0010  /* doDeletions - log debugging messages. */
00046 #define DBG_SIDNODEL   0x0020  /* doDeletions - suppress actual deletion. */
00047 #define DBG_VDIREVAL   0x0040  /* VDirEvaluator - log debugging messages. */
00048 #define DBG_NOWEEDREC  0x0080  /* do not try to recover an incomplete weed. */
00049 #define DBG_VMEMPOOL   0x0100  /* VMemPool - log debugging messages. */
00050 #define DBG_SAVECORE   0x0200  /* Startup - if a file named "core"
00051                                   exists in the current directory,
00052                                   rename it to core.DATE.TIME, where
00053                                   DATE.TIME are the current date and time. */
00054 #define DBG_STALENFS   0x0400  /* NFS interface - log uses of stale handles. */
00055 #define DBG_MASTERSHIP 0x0800  /* Mastership transfer - log progress, and
00056                                   details of any errors */
00057 #define DBG_COW        0x1000  /* File copy-on-write - log when it occurs. */
00058 #define DBG_ACCESS     0x2000  /* Access control - log parsing of tables */
00059 #define DBG_REPLICATION 0x4000 /* Details of any errors in replicate() */
00060 
00061 /* Global Function prototypes.  These are in a namespace because on
00062    some systems there's already a function named dprintf. */
00063 namespace Repos
00064 {
00065   /* Set debugging level flags.  The repository sets this from the -d flag
00066      on the command line, or from [Repository]debug_level.  See
00067      repository.8.mtex for debug levels currently in use.
00068   */
00069   extern void setDebugLevel(int level);
00070 
00071   /* True if level == 0 or (level & debugLevel) != 0 */
00072   extern int isDebugLevel(int level);
00073 
00074   extern "C"
00075   {
00076     /* Log debugging information to stderr if isDebugLevel(level) */
00077     extern void dprintf(int level, const char *fmt, ...);
00078   }
00079 
00080   extern void log_call(struct svc_req *rqstp,
00081                        struct dispatch_entry* dent,
00082                        union argument_types* argument);
00083   extern void log_result(struct svc_req *rqstp,
00084                          struct dispatch_entry* dent,
00085                          union result_types* result);
00086   extern void pr_void(char* buf);
00087   extern void pr_nfs_fh(char* buf, nfs_fh *argp);
00088   extern void pr_sattrargs(char* buf, sattrargs *argp);
00089   extern void pr_diropargs(char* buf, diropargs *argp);
00090   extern void pr_readargs(char* buf, readargs *argp);
00091   extern void pr_writeargs(char* buf, writeargs *argp);
00092   extern void pr_createargs(char* buf, createargs *argp);
00093   extern void pr_renameargs(char* buf, renameargs *argp);
00094   extern void pr_linkargs(char* buf, linkargs *argp);
00095   extern void pr_symlinkargs(char* buf, symlinkargs *argp);
00096   extern void pr_readdirargs(char* buf, readdirargs *argp);
00097   extern void pr_attrstat(char* buf, attrstat *argp);
00098   extern void pr_diropres(char* buf, diropres *argp);
00099   extern void pr_readlinkres(char* buf, readlinkres *argp);
00100   extern void pr_readres(char* buf, readres *argp);
00101   extern void pr_nfsstat(char* buf, nfsstat *argp);
00102   extern void pr_readdirres(char* buf, readdirres *argp);
00103   extern void pr_statfsres(char* buf, statfsres *argp);
00104 
00105   extern VRErrorCode::errorCode errno_to_errorCode(int err);
00106 }
00107 
00108 #endif

Generated on Mon May 8 00:48:44 2006 for Vesta by  doxygen 1.4.2