2 * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
27 #ifndef __CT_LOGGER_H__
28 #define __CT_LOGGER_H__
34 * Defines logging functionality for use by crypto tokens framework and file
35 * tokens server. This is only compiled in debug builds when the macro
36 * __CT_LOGGING__ is defined.
41 #if defined(_DEBUG) && defined(__CT_LOGGING__)
43 #define LOG(X) CTLogger::Log(this, (X))
44 #define LOG1(X, Y) CTLogger::Log(this, (X), (Y))
45 #define LOG2(X, Y, Z) CTLogger::Log(this, (X), (Y), (Z))
46 #define LOG_INC_INDENT() CTLogger::UpdateIndent(1)
47 #define LOG_DEC_INDENT() CTLogger::UpdateIndent(-1)
54 #define LOG_INC_INDENT()
55 #define LOG_DEC_INDENT()
60 * Class providing methods used by logging macros. These are not designed to be
61 * called directly. If logging is not turned on they will simply panic.
66 IMPORT_C static void Log(TAny* aObject, TRefByValue<const TDesC16> aFmt, ...);
67 IMPORT_C static void UpdateIndent(TInt aInc);
69 static void LogL(const TDesC& aString);
72 #endif // __CTLOGGER_H__