author | Billy Gibson <Billy.Gibson@nokia.com> |
Fri, 28 May 2010 18:01:03 +0100 | |
branch | GeoConversion |
changeset 34 | 0c0ad64c882c |
permissions | -rw-r--r-- |
34
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
1 |
/* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
8 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
11 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
13 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
14 |
* Description: Defines the macros for logging mechanism in LBT |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
15 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
17 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
18 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
19 |
#ifndef LBT_LOGGER_H |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
20 |
#define LBT_LOGGER_H |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
21 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
22 |
/** |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
23 |
* To use this logger mechanism you also need to add flogger.lib to the mmp |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
24 |
* using, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
25 |
* DEBUGLIBRARY flogger.lib |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
26 |
*/ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
27 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
28 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
29 |
/** |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
30 |
* The trace level is defined as follows, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
31 |
* 0x[moduleid - 4digits][logginglevel-4digits], |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
32 |
* The currently define logginglevels are |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
33 |
* 0x0001 - Verbose |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
34 |
* things like entered method, leaving method etc, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
35 |
* logs of the parameters to methods, files |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
36 |
* that are being used, creating a key, creating a file, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
37 |
* opening a resource, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
38 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
39 |
* 0x0002 - Warning |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
40 |
* things like events, error cases that were not processed |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
41 |
* but ignored. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
42 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
43 |
* 0x0003 - Operations |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
44 |
* things like what operation started (create, delete), |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
45 |
* manipulations to the data structures, important events like |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
46 |
* MMC card , app uninstall events which we process, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
47 |
* current location, triggers being monitored, psy conked off, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
48 |
* any other such important event. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
49 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
50 |
* 0x0004 - Errors |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
51 |
* log all _ASSERT_DEBUG kind of cases, basically things which |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
52 |
* you don't expect to happen but happened - Sounds like paradox ;-) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
53 |
* Also log all error cases with this trace level. |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
54 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
55 |
* 0x0005 - Fatal |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
56 |
* Use this if the server cannot recover from this error and you |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
57 |
* have to crash !! ;-) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
58 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
59 |
* So for a create trigger operation in server the log should be like |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
60 |
* LBT_TRACE(KLbtLogOperation|KLbtLogServerLogic,"Creating Trigger"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
61 |
*/ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
62 |
#define KLbtLogLevelMask 0x0000FFFF |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
63 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
64 |
#define KLbtLogVerbose 0x00000001 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
65 |
#define KLbtLogWarning 0x00000002 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
66 |
#define KLbtLogOperation 0x00000003 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
67 |
#define KLbtLogError 0x00000004 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
68 |
#define KLbtLogFatal 0x00000005 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
69 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
70 |
/** |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
71 |
* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
72 |
* Then for the module id lets use |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
73 |
* 0x0001 - Lbt Client Library |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
74 |
* 0x0002 - Lbt Server Core |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
75 |
* 0x0003 - Lbt Server Logic Base |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
76 |
* 0x0004 - Lbt Server Logic ( ecom plugin ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
77 |
* 0x0005 - Lbt Container |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
78 |
* 0x0006 - Lbt Strategy Plugin api |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
79 |
* 0x0007 - Lbt Strategy Implementation ( Ecom plugin ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
80 |
* 0x0008 - Lbt Movement detector plugin api |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
81 |
* 0x0009 - Lbt Cell id Movement Detector |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
82 |
* Did I miss any component ? |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
83 |
*/ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
84 |
#define KLbtLogComponentMask 0xFFFF0000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
85 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
86 |
#define KLbtLogClientLib 0x00010000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
87 |
#define KLbtLogServerCore 0x00020000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
88 |
#define KLbtLogServerLogicBase 0x00030000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
89 |
#define KLbtLogServerLogic 0x00040000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
90 |
#define KLbtLogContainer 0x00050000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
91 |
#define KLbtLogStrategyPluginApi 0x00060000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
92 |
#define KLbtLogStrategyEngine 0x00070000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
93 |
#define KLbtLogMovementDetectorApi 0x00080000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
94 |
#define KLbtLogCellIdMovementDetector 0x00090000 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
95 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
96 |
#ifdef _DEBUG |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
97 |
#define _LBT_DEBUG |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
98 |
#endif // #ifdef _DEBUG |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
99 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
100 |
// define _LBT_DEBUG to enable LBT logging |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
101 |
#define _LBT_DEBUG |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
102 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
103 |
#ifdef _LBT_DEBUG |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
104 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
105 |
#include <flogger.h> |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
106 |
#include <f32file.h> |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
107 |
#include "lbtloggerimpl.h" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
108 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
109 |
_LIT8( KEndOfLineChars, "\r\n"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
110 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
111 |
// CLASS DECLARATION |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
112 |
class TLogFunc |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
113 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
114 |
public: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
115 |
TLogFunc(const char aFunctionName[]) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
116 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
117 |
const unsigned char* string = (unsigned char*)(aFunctionName); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
118 |
iBuffer.Zero(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
119 |
iBuffer.Copy(string); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
120 |
TBuf8<150> buf; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
121 |
buf.Zero(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
122 |
buf.Append(_L("=>")); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
123 |
buf.Append(iBuffer); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
124 |
CLbtLoggerImpl* loggerImpl = CLbtLoggerImpl::CreateLogger(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
125 |
if( loggerImpl ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
126 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
127 |
RFileLogger& logger = loggerImpl->GetFileLogger(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
128 |
logger.Write( buf ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
129 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
130 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
131 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
132 |
~TLogFunc() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
133 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
134 |
RThread thread; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
135 |
TInt exitReason = thread.ExitReason(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
136 |
if(exitReason != KErrNone) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
137 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
138 |
TExitCategoryName name = thread.ExitCategory(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
139 |
TBuf8<400> buf; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
140 |
buf.Zero(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
141 |
buf.Append(_L("LBT PANICKED : ")); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
142 |
buf.Append(name); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
143 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
144 |
CLbtLoggerImpl* loggerImpl = CLbtLoggerImpl::CreateLogger(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
145 |
if(loggerImpl) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
146 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
147 |
RFileLogger& logger = loggerImpl->GetFileLogger(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
148 |
logger.Write( buf); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
149 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
150 |
// The thread has panicked and hence dont print the exit placeholder |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
151 |
thread.Close(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
152 |
return; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
153 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
154 |
iBuffer.Append(_L("=>")); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
155 |
CLbtLoggerImpl* loggerImpl = CLbtLoggerImpl::CreateLogger(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
156 |
if(loggerImpl) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
157 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
158 |
RFileLogger& logger = loggerImpl->GetFileLogger(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
159 |
logger.Write( iBuffer); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
160 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
161 |
thread.Close(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
162 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
163 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
164 |
static void FileName( TDes& aFileNameBuffer ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
165 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
166 |
TTime currTime; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
167 |
currTime.HomeTime(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
168 |
TDateTime dt = currTime.DateTime(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
169 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
170 |
_LIT16( filefmt, "%S_%d%d%d_%d%d%d.log" ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
171 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
172 |
TBuf<150> logFileName; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
173 |
logFileName.Append( _L("C:\\Logs\\Epos\\lbt_func") ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
174 |
aFileNameBuffer.AppendFormat( filefmt(), &logFileName, dt.Day(), |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
175 |
dt.Month(), dt.Year(), dt.Hour(), dt.Minute(), dt.Second() ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
176 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
177 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
178 |
static void FormatTextToBuffer( TDes8& aTrg, const TDesC8& aText ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
179 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
180 |
TTime currTime; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
181 |
currTime.HomeTime(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
182 |
TDateTime dt = currTime.DateTime(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
183 |
_LIT8( dtFmt, "%d/%d/%d %d:%d:%d "); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
184 |
aTrg.AppendFormat( dtFmt(), dt.Day(), dt.Month(), dt.Year(), dt.Hour(), dt.Minute(), dt.Second() ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
185 |
aTrg.Append( aText ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
186 |
aTrg.Append( KEndOfLineChars ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
187 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
188 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
189 |
static void RenameFileIfRequired() |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
190 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
191 |
RFs fs; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
192 |
RFile file; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
193 |
fs.Connect(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
194 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
195 |
TInt err = file.Open( fs, _L("C:\\Logs\\Epos\\lbt_func.log"), EFileWrite|EFileShareAny ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
196 |
if( KErrNone == err ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
197 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
198 |
// Check Size of file |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
199 |
TInt size; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
200 |
file.Size( size ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
201 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
202 |
if( size > 1024 ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
203 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
204 |
file.Close(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
205 |
TBuf<200> fileName; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
206 |
FileName( fileName ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
207 |
//BaflUtils::RenameFile( fs, _L("C:\\Logs\\Epos\\lbt.log"), fileName ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
208 |
fs.Rename(_L("C:\\Logs\\Epos\\lbt_func.log"), fileName ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
209 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
210 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
211 |
file.Close(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
212 |
fs.Close(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
213 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
214 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
215 |
private: |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
216 |
TBuf8<150> iBuffer; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
217 |
}; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
218 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
219 |
#define FUNC_ENTER(x) //TLogFunc lbtlog(x); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
220 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
221 |
#define STOPLOGGING CLbtLoggerImpl::Destroy(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
222 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
223 |
#define ERROR(x,y) { TBuf8<150> buffer; \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
224 |
const unsigned char* string = (unsigned char*)(x); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
225 |
buffer.Zero(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
226 |
buffer.Copy(string); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
227 |
buffer.Append(_L(": LBT ERROR")); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
228 |
CLbtLoggerImpl* loggerImpl = CLbtLoggerImpl::CreateLogger(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
229 |
if( loggerImpl ) \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
230 |
{ \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
231 |
RFileLogger& logger = loggerImpl->GetFileLogger(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
232 |
logger.WriteFormat( buffer, y); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
233 |
} \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
234 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
235 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
236 |
#define LOG(x) { TBuf8<150> buffer; \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
237 |
const unsigned char* string = (unsigned char*)(x); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
238 |
buffer.Zero(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
239 |
buffer.Copy(string); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
240 |
CLbtLoggerImpl* loggerImpl = CLbtLoggerImpl::CreateLogger(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
241 |
if( loggerImpl ) \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
242 |
{ \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
243 |
RFileLogger& logger = loggerImpl->GetFileLogger(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
244 |
logger.Write( buffer); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
245 |
} \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
246 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
247 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
248 |
#define LOG1(x,y) { TBuf8<150> buffer; \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
249 |
const unsigned char* string = (unsigned char*)(x); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
250 |
buffer.Zero(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
251 |
buffer.Copy(string); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
252 |
CLbtLoggerImpl* loggerImpl = CLbtLoggerImpl::CreateLogger(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
253 |
if( loggerImpl ) \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
254 |
{ \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
255 |
RFileLogger& logger = loggerImpl->GetFileLogger(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
256 |
logger.WriteFormat( buffer, y); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
257 |
} \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
258 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
259 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
260 |
#define LOGSTRING(x, y) { \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
261 |
_LIT(KTmpStr, x); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
262 |
CLbtLoggerImpl* loggerImpl = CLbtLoggerImpl::CreateLogger(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
263 |
if( loggerImpl ) \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
264 |
{ \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
265 |
RFileLogger& logger = loggerImpl->GetFileLogger(); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
266 |
logger.WriteFormat( TRefByValue<const TDesC>(KTmpStr()), y); \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
267 |
} \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
268 |
} \ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
269 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
270 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
271 |
#define LBT_FILE_LOGGER 1 // Always log to file |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
272 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
273 |
const char* const LbtLogLevelStr[] = |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
274 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
275 |
"", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
276 |
"Verbose", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
277 |
"Warning", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
278 |
"Operation", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
279 |
"Error", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
280 |
"Fatal" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
281 |
}; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
282 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
283 |
const char* const LbtLogComponentStr[] = |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
284 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
285 |
"", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
286 |
"client lib", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
287 |
"server core", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
288 |
"server logic api", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
289 |
"server logic", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
290 |
"container", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
291 |
"strategy api", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
292 |
"strategy engine", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
293 |
"movement detector api", |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
294 |
"cell id movement detector" |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
295 |
}; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
296 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
297 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
298 |
#define LENGTH(str,len) for(len = 0; str[len]; len++) {} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
299 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
300 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
301 |
NONSHARABLE_CLASS( TLbtDesOverflow ) : public TDes8Overflow |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
302 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
303 |
void Overflow(TDes8 &/*aDes*/) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
304 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
305 |
// Dummy Implementation to prevent User panic 23 |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
306 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
307 |
}; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
308 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
309 |
#define LBT_TRACE(level, file, lineno, desc...) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
310 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
311 |
/* |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
312 |
LOCAL_C void LBT_TRACE(TInt level, const char* file, TInt lineno, const char* desc,...) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
313 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
314 |
_LIT8(fmt, "!%s %s %s:%d "); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
315 |
TInt desclength, filelength, fmtlength; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
316 |
fmtlength = fmt().Length(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
317 |
LENGTH(desc,desclength); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
318 |
LENGTH(file,filelength); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
319 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
320 |
HBufC8* str = NULL; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
321 |
TRAPD(error, str = HBufC8::NewL(desclength+fmtlength+filelength+10+25+200)); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
322 |
if ( error != KErrNone ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
323 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
324 |
return; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
325 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
326 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
327 |
TPtr8 ptr(str->Des()); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
328 |
ptr.Zero(); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
329 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
330 |
TLbtDesOverflow ovrflowHandler; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
331 |
ptr.AppendFormat(fmt(), |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
332 |
&ovrflowHandler, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
333 |
LbtLogLevelStr[(level&KLbtLogLevelMask)], |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
334 |
LbtLogComponentStr[(level&KLbtLogComponentMask) >> 16], |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
335 |
file, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
336 |
lineno); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
337 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
338 |
HBufC8* descbuf = HBufC8::NewL(desclength); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
339 |
if ( error == KErrNone ) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
340 |
{ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
341 |
descbuf->Des().Append(reinterpret_cast<const TUint8 *>(desc), desclength); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
342 |
VA_LIST list; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
343 |
VA_START(list, desc); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
344 |
ptr.AppendFormat(*descbuf, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
345 |
&ovrflowHandler, |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
346 |
list ); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
347 |
delete descbuf; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
348 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
349 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
350 |
#ifdef LBT_FILE_LOGGER |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
351 |
_LIT(KLbtTraceDir,"epos"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
352 |
_LIT(KLbtTraceFile,"lbt.log"); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
353 |
RFileLogger::Write(KLbtTraceDir(), KLbtTraceFile(), EFileLoggingModeAppend, *str); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
354 |
#else |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
355 |
RDebug::RawPrint(*str); |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
356 |
#endif |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
357 |
delete str; |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
358 |
} |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
359 |
*/ |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
360 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
361 |
#else // if _DEBUG flag is not defined |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
362 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
363 |
#define LBT_TRACE(level, file, lineno, desc...) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
364 |
#define FUNC_ENTER(x) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
365 |
#define STOPLOGGING |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
366 |
#define LOG(x) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
367 |
#define LOG1(x,y) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
368 |
#define ERROR(x,y) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
369 |
#define LOGSTRING(x, y) |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
370 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
371 |
#endif // end of #ifdef _DEBUG |
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
372 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
373 |
|
0c0ad64c882c
Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff
changeset
|
374 |
#endif // LBT_LOGGER_H |