/* ************************************************************************ * * log.h - * * Copyright (c) 1995 * * ETH Zuerich * Institut fuer Molekularbiologie und Biophysik * ETH-Hoenggerberg * CH-8093 Zuerich * * All Rights Reserved * * Date of last modification : 95/09/15 * Pathname of SCCS file : /export/home3/cb/garant-1.0/src/SCCS/s.log.h * SCCS identification : 1.2 * ************************************************************************ */ /**************************************************************************/ /* log.h */ /* */ /* writes lines of text intoo a file or stdio */ /**************************************************************************/ #ifndef _LOG_H_ #define _LOG_H_ #include class OldLogs; class Log { static FILE *fp; static OldLogs *hist; static int nrWarns; void write(char *); public: Log() {} // void init(); /* call at beginning of prog */ void open(char *); /* redirect to file */ void append(char *); /* redirect to existing file */ void close(); /* close file */ void w(char *); /* write to file or stdio */ void r(char *); /* report to file or stdio */ void warn(int,char *); /* write warning to file */ /* or stdio, stop if more */ /* than given number of */ /* warnings */ /* negative number */ /* -> print always */ }; #endif