presencefwsimpleadpt/src/simpleplugindebugutils.cpp
branchRCL_3
changeset 35 fbd2e7cec7ef
parent 0 c8caa15ef882
equal deleted inserted replaced
34:2669f8761a99 35:fbd2e7cec7ef
       
     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:    DEBUG utilities, for DEBUG version only
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <e32std.h>
       
    23 
       
    24 #ifdef _DEBUG
       
    25 #include <flogger.h>
       
    26 #include <e32debug.h>
       
    27 #include <apparc.h>
       
    28 #include <bautils.h>
       
    29 
       
    30 #include "simpleplugindebugutils.h"
       
    31 
       
    32 //**********************************
       
    33 // PluginLogger
       
    34 //**********************************
       
    35 const TInt KLogBufferLength = 256;
       
    36 
       
    37 // ---------------------------------------------------------
       
    38 // PluginLogger::Log
       
    39 // ---------------------------------------------------------
       
    40 //
       
    41 void PluginLogger::Log(TRefByValue<const TDesC> aFmt,...)
       
    42     {
       
    43     VA_LIST list;
       
    44     VA_START(list, aFmt);
       
    45 
       
    46     // Print to log file
       
    47     TBuf<KLogBufferLength> buf;
       
    48     buf.FormatList(aFmt, list);
       
    49 
       
    50     _LIT(KLogDir, "simple");
       
    51     _LIT(KLogFile, "simple.txt");
       
    52     // Write to log file
       
    53     RFileLogger::Write(KLogDir, KLogFile, EFileLoggingModeAppend, buf);
       
    54     }
       
    55 
       
    56 #endif  // _DEBUG
       
    57 
       
    58 
       
    59 
       
    60 //  End of File
       
    61