|
1 /* |
|
2 * Copyright (c) 2006 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: Logging functionality for BVA |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef BVALOG_H |
|
21 #define BVALOG_H |
|
22 |
|
23 ///////////////////////////////////////////////////////////////////////////// |
|
24 // #Defines that control printing of additional information to debug stream. |
|
25 ///////////////////////////////////////////////////////////////////////////// |
|
26 |
|
27 // INCLUDES |
|
28 |
|
29 #include "bvalogdef.h" |
|
30 #include <e32std.h> |
|
31 |
|
32 // DEFINES |
|
33 |
|
34 #ifdef BVA_ENABLE_LOGGING |
|
35 #define LOG(s) BvaLog::Log(_L(s)) |
|
36 #define LOG1(s, v) BvaLog::Log( _L(s), v ) |
|
37 #define LOG2(s, v1, v2) BvaLog::Log( _L(s), v1, v2 ) |
|
38 #else |
|
39 #define LOG(s) |
|
40 #define LOG1(s, v) |
|
41 #define LOG2(s, v1, v2) |
|
42 #endif // BVA_ENABLE_LOGGING |
|
43 |
|
44 // DATA TYPES |
|
45 |
|
46 |
|
47 // CLASS DECLARATION |
|
48 |
|
49 /** |
|
50 * Class offers logging functionality. |
|
51 */ |
|
52 NONSHARABLE_CLASS( BvaLog ) |
|
53 { |
|
54 |
|
55 public: |
|
56 |
|
57 /** |
|
58 * Log the message. |
|
59 * @param aText text to be written to log. |
|
60 */ |
|
61 static void Log( TRefByValue<const TDesC> aText, ... ); |
|
62 |
|
63 private: // constructor |
|
64 |
|
65 /// Prohibited default constructor |
|
66 BvaLog(); |
|
67 |
|
68 /// Prohibited copy constructor |
|
69 BvaLog( const BvaLog& ); |
|
70 |
|
71 /// Prohibited assignment operator |
|
72 BvaLog& operator=( const BvaLog& ); |
|
73 }; |
|
74 |
|
75 #endif // BVALOG_H |
|
76 |
|
77 // End of File |