forked from Devil084/symdroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
STLogger.h
50 lines (29 loc) · 738 Bytes
/
STLogger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef STLOGGER_H
#define STLOGGER_H
#ifdef __WINS__
#define LOG_TO_FILE
#endif
#include <coemain.h>
#include "STDefs.h"
#define LOG CLogger::InstanceL()
const TUid KUidLoggerSingleton = { 0x10000EF4 };
class CLogger : public CCoeStatic
{
public:
IMPORT_C static CLogger* InstanceL();
IMPORT_C void WriteL(const TDesC& aText);
IMPORT_C void WriteL(const TDesC8& aText);
IMPORT_C void WriteLineL(const TDesC& aText);
IMPORT_C void WriteLineL(const TDesC8& aText);
IMPORT_C void WriteLineL();
IMPORT_C void WriteL(TInt aInt);
IMPORT_C void WriteLineL(TInt aInt);
protected:
CLogger() : CCoeStatic(KUidLoggerSingleton) {}
~CLogger();
void ConstructL();
private:
RFs iFsSession;
RFile iLogFile;
};
#endif