2 * Amanda, The Advanced Maryland Automatic Network Disk Archiver
3 * Copyright (c) 1991-1998 University of Maryland at College Park
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of U.M. not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission. U.M. makes no representations about the
13 * suitability of this software for any purpose. It is provided "as is"
14 * without express or implied warranty.
16 * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
18 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 * Author: James da Silva, Systems Design and Analysis Group
24 * Computer Science Department
25 * University of Maryland at College Park
28 * $Id: logfile.h,v 1.13 2006/05/25 01:47:20 johnfranks Exp $
30 * interface to logfile module
38 * L_FAIL is defined on m88k-motorola-sysv4 systems for multiprocessor
39 * support, which we don't need, so it gets undefined here.
43 typedef enum logtype_e {
45 L_FATAL, /* program died for some reason, used by error() */
46 L_ERROR, L_WARNING, L_INFO, L_SUMMARY, /* information messages */
47 L_START, L_FINISH, /* start/end of run */
49 L_SUCCESS, L_PARTIAL, L_FAIL, L_STRANGE, /* the end of a dump */
50 L_CHUNK, L_CHUNKSUCCESS, /* ... continued */
51 L_STATS, /* statistics */
52 L_MARKER, /* marker for reporter */
53 L_CONT /* continuation line, used when reading */
56 typedef enum program_e {
57 P_UNKNOWN, P_PLANNER, P_DRIVER, P_REPORTER, P_DUMPER, P_CHUNKER,
60 #define P_LAST P_AMFLUSH
62 extern char *logtype_str[];
64 extern int curlinenum;
65 extern logtype_t curlog;
66 extern program_t curprog;
68 extern char *program_str[];
70 void logerror(char *);
71 void log_add(logtype_t typ, char * format, ...)
72 __attribute__ ((format (printf, 2, 3)));
73 char* log_genstring(logtype_t typ, char *pname, char * format, ...);
74 /* __attribute__ ((format (printf, 3, 4))); */
75 void log_start_multiline(void);
76 void log_end_multiline(void);
77 void log_rename(char *datestamp);
78 int get_logline(FILE *);
80 #endif /* ! LOGFILE_H */