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.6.8.1.2.1 2002/02/10 03:31:53 jrjackson 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_FAIL, L_STRANGE, /* the end of a dump */
50 L_STATS, /* statistics */
51 L_MARKER, /* marker for reporter */
52 L_CONT /* continuation line, used when reading */
55 typedef enum program_e {
56 P_UNKNOWN, P_PLANNER, P_DRIVER, P_REPORTER, P_DUMPER, P_TAPER, P_AMFLUSH
58 #define P_LAST P_AMFLUSH
60 extern char *logtype_str[];
62 extern int curlinenum;
63 extern logtype_t curlog;
64 extern program_t curprog;
66 extern char *program_str[];
68 void logerror P((char *));
69 void log_add P((logtype_t typ, char * format, ...))
70 __attribute__ ((format (printf, 2, 3)));
71 void log_start_multiline P((void));
72 void log_end_multiline P((void));
73 void log_rename P((char *datestamp));
74 int get_logline P((FILE *));
76 #endif /* ! LOGFILE_H */