diff -r 2669f8761a99 -r fbd2e7cec7ef presencefwsimpleadpt/src/simpleplugindebugutils.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presencefwsimpleadpt/src/simpleplugindebugutils.cpp Wed Sep 01 12:23:14 2010 +0100 @@ -0,0 +1,61 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: DEBUG utilities, for DEBUG version only +* +*/ + + + + +// INCLUDE FILES +#include + +#ifdef _DEBUG +#include +#include +#include +#include + +#include "simpleplugindebugutils.h" + +//********************************** +// PluginLogger +//********************************** +const TInt KLogBufferLength = 256; + +// --------------------------------------------------------- +// PluginLogger::Log +// --------------------------------------------------------- +// +void PluginLogger::Log(TRefByValue aFmt,...) + { + VA_LIST list; + VA_START(list, aFmt); + + // Print to log file + TBuf buf; + buf.FormatList(aFmt, list); + + _LIT(KLogDir, "simple"); + _LIT(KLogFile, "simple.txt"); + // Write to log file + RFileLogger::Write(KLogDir, KLogFile, EFileLoggingModeAppend, buf); + } + +#endif // _DEBUG + + + +// End of File +