1 /* |
|
2 * Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Java platform 2.0 javaapppreconverter process |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NOARMLOGS_H |
|
20 #define NOARMLOGS_H |
|
21 |
|
22 // Logging makes the process dependent on OMJ javautils.dll and javaenv.dll. |
|
23 // However they are no available in device when converter processes are executed |
|
24 // during OMJ installation before OMJ binaries have been copied to device |
|
25 // nor when converter processes are executed during OMJ uninstallation after |
|
26 // OMJ binaries have been removed from device. |
|
27 // If included in ARMV5 compilation this header file redefines all OMJ |
|
28 // logging macros so that they use directly RFileLogger so that they can be used without |
|
29 // javautils.dll and javaenv.dll. Otherwise includes normal logging header file because |
|
30 // in emulator javautils.dll and javaenv.dll are available always. |
|
31 |
|
32 #ifndef __WINS__ |
|
33 |
|
34 #undef JELOG |
|
35 #undef JELOG2 |
|
36 #undef JELOG3 |
|
37 #undef JELOG4 |
|
38 |
|
39 #undef LOG |
|
40 #undef LOG1 |
|
41 #undef LOG2 |
|
42 #undef LOG3 |
|
43 #undef LOG4 |
|
44 |
|
45 #undef WLOG |
|
46 #undef WLOG1 |
|
47 #undef WLOG2 |
|
48 #undef WLOG3 |
|
49 #undef WLOG4 |
|
50 |
|
51 #undef ELOG |
|
52 #undef ELOG1 |
|
53 #undef ELOG2 |
|
54 #undef ELOG3 |
|
55 #undef ELOG4 |
|
56 |
|
57 #undef LOG1WSTR |
|
58 |
|
59 #include <flogger.h> |
|
60 _LIT(KJavaLogDir, "java\\full"); |
|
61 _LIT(KJavaLogFile, "JavaConverters.log"); |
|
62 |
|
63 #define JELOG(component, str) |
|
64 #define JELOG2(component) |
|
65 #define JELOG3(component, level, str) |
|
66 #define JELOG4(component, level) |
|
67 |
|
68 #define LOG(component, level, str) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f); } |
|
69 #define LOG1(component, level, str, a) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a); } |
|
70 #define LOG2(component, level, str, a, b) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b); } |
|
71 #define LOG3(component, level, str, a, b, c) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c); } |
|
72 #define LOG4(component, level, str, a, b, c, d) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c, d); } |
|
73 |
|
74 #define WLOG(component, str) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f); } |
|
75 #define WLOG1(component, str, a) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a); } |
|
76 #define WLOG2(component, str, a, b) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b); } |
|
77 #define WLOG3(component, str, a, b, c) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c); } |
|
78 #define WLOG4(component, str, a, b, c, d) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c, d); } |
|
79 |
|
80 #define ELOG(component, str) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f); } |
|
81 #define ELOG1(component, str, a) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a); } |
|
82 #define ELOG2(component, str, a, b) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b); } |
|
83 #define ELOG3(component, str, a, b, c) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c); } |
|
84 #define ELOG4(component, str, a, b, c, d) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::WriteFormat(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f, a, b, c, d); } |
|
85 |
|
86 #define LOG1WSTR(component, level, str, wstr) { TBuf8<1024> f((const TUint8 *)str); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, f); TBuf16<KLogBufferSize> w((const TUint16 *)wstr); RFileLogger::Write(KJavaLogDir, KJavaLogFile, EFileLoggingModeAppend, w); } |
|
87 |
|
88 #else |
|
89 |
|
90 // normal logging |
|
91 #include "logger.h" |
|
92 |
|
93 #endif // __WINS__ |
|
94 |
|
95 #endif // NOARMLOGS_H |
|