Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / afssvrcfg / logfile.h
blob88c035a45d767ae64f9a5fdef2f97e51d109af95
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
10 #include <windows.h>
11 #include <stdio.h>
13 enum LOGFILE_TIMESTAMP_MODE { TSM_NEVER, TSM_AT_OPEN_AND_CLOSE, TSM_EACH_ENTRY };
14 enum LOGFILE_OPEN_MODE { OM_OVERWRITE, OM_APPEND };
17 class LOGFILE
19 FILE *m_fp;
21 char m_szPath[MAX_PATH];
23 LOGFILE_TIMESTAMP_MODE m_eTimeStampMode;
25 public:
26 LOGFILE();
27 ~LOGFILE();
29 BOOL Open( const char *pszLogFilePath,
30 LOGFILE_OPEN_MODE eOpenMode = OM_OVERWRITE,
31 LOGFILE_TIMESTAMP_MODE eTimeStampMode = TSM_EACH_ENTRY
33 BOOL Close();
35 char *GetPath() { return m_szPath; }
37 BOOL Write(const char *pszMsg, ...);
39 BOOL WriteError(const char *pszMsg, DWORD nErrorCode, ...);
41 BOOL WriteMultistring(const char *pszMultiStr);
43 BOOL WriteTimeStamp();
45 BOOL WriteBoolResult(BOOL bResult);