|
1 /* |
|
2 * Copyright (c) 2002 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: Implementation for enabling meeting request data logging |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 |
|
22 #include <e32svr.h> |
|
23 #include "MRDataLog.h" |
|
24 |
|
25 #ifdef ICALUI_ENABLE_MRDATA_LOGGING |
|
26 #include <flogger.h> |
|
27 |
|
28 /// Folder where the OMRViewers log resides |
|
29 _LIT( KLogFolder, "mrdata" ); |
|
30 /// The name of the log file |
|
31 _LIT( KLogFileName, "mrdata.txt" ); |
|
32 /// How many characters a log line can contain |
|
33 const TInt KLogLineLength = 256; |
|
34 |
|
35 // --------------------------------------------------------- |
|
36 // Log() |
|
37 // |
|
38 // --------------------------------------------------------- |
|
39 void MRDataLog::Log( TRefByValue<const TDesC> aText, ... ) |
|
40 { |
|
41 VA_LIST args; |
|
42 VA_START( args, aText ); |
|
43 |
|
44 TBuf<KLogLineLength> buf; |
|
45 buf.FormatList( aText, args ); |
|
46 |
|
47 RFileLogger logger; |
|
48 TInt ret = logger.Connect(); |
|
49 if (ret==KErrNone) |
|
50 { |
|
51 logger.SetDateAndTime( EFalse,EFalse ); |
|
52 logger.CreateLog( KLogFolder, KLogFileName, EFileLoggingModeAppend ); |
|
53 logger.Write(buf); |
|
54 } |
|
55 |
|
56 logger.Close(); |
|
57 VA_END( args ); |
|
58 } |
|
59 |
|
60 #endif // ICALUI_ENABLE_MRDATA_LOGGING |
|
61 |
|
62 // End of file |