LibreOffice Module onlineupdate (master)
1
onlineupdate
source
update
common
updatelogging.h
Go to the documentation of this file.
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
#ifndef UPDATELOGGING_H
6
#define UPDATELOGGING_H
7
8
#include "
updatedefines.h
"
9
#include <stdio.h>
10
11
class
UpdateLog
12
{
13
public
:
14
static
UpdateLog
&
GetPrimaryLog
()
15
{
16
static
UpdateLog
primaryLog;
17
return
primaryLog;
18
}
19
20
void
Init
(
NS_tchar
*
sourcePath
,
const
NS_tchar
* fileName,
21
const
NS_tchar
* alternateFileName,
bool
append);
22
void
Finish
();
23
void
Flush
();
24
void
Printf
(
const
char
*fmt, ... );
25
void
WarnPrintf
(
const
char
*fmt, ... );
26
27
~UpdateLog
()
28
{
29
Finish
();
30
}
31
32
protected
:
33
UpdateLog
();
34
FILE
*
logFP
;
35
NS_tchar
*
sourcePath
;
36
};
37
38
#define LOG_WARN(args) UpdateLog::GetPrimaryLog().WarnPrintf args
39
#define LOG(args) UpdateLog::GetPrimaryLog().Printf args
40
#define LogInit(PATHNAME_, FILENAME_) \
41
UpdateLog::GetPrimaryLog().Init(PATHNAME_, FILENAME_, 0, false)
42
#define LogInitAppend(PATHNAME_, FILENAME_, ALTERNATE_) \
43
UpdateLog::GetPrimaryLog().Init(PATHNAME_, FILENAME_, ALTERNATE_, true)
44
#define LogFinish() UpdateLog::GetPrimaryLog().Finish()
45
#define LogFlush() UpdateLog::GetPrimaryLog().Flush()
46
47
#endif
UpdateLog
Definition:
updatelogging.h:12
UpdateLog::Init
void Init(NS_tchar *sourcePath, const NS_tchar *fileName, const NS_tchar *alternateFileName, bool append)
Definition:
updatelogging.cxx:23
UpdateLog::Printf
void Printf(const char *fmt,...)
Definition:
updatelogging.cxx:62
UpdateLog::WarnPrintf
void WarnPrintf(const char *fmt,...)
Definition:
updatelogging.cxx:74
UpdateLog::~UpdateLog
~UpdateLog()
Definition:
updatelogging.h:27
UpdateLog::Flush
void Flush()
Definition:
updatelogging.cxx:54
UpdateLog::logFP
FILE * logFP
Definition:
updatelogging.h:34
UpdateLog::Finish
void Finish()
Definition:
updatelogging.cxx:45
UpdateLog::sourcePath
NS_tchar * sourcePath
Definition:
updatelogging.h:35
UpdateLog::GetPrimaryLog
static UpdateLog & GetPrimaryLog()
Definition:
updatelogging.h:14
UpdateLog::UpdateLog
UpdateLog()
Definition:
updatelogging.cxx:17
RTFKeyword::FILE
@ FILE
NS_tchar
char NS_tchar
Definition:
types.hxx:20
updatedefines.h
Generated on Sun Jul 30 2023 04:39:37 for LibreOffice Module onlineupdate (master) by
1.9.3