videofeeds/server/tsrc/IptvTestUtility/src/CIptvTestLogger.cpp
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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 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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   implements logging functionality*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "CIptvTestLogger.h"
       
    22 //#include "MIptvTestTimerObserver.h"
       
    23 #include "VCXTestLog.h"
       
    24 
       
    25 // EXTERNAL DATA STRUCTURES
       
    26 
       
    27 // EXTERNAL FUNCTION PROTOTYPES
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // LOCAL CONSTANTS AND MACROS
       
    34 
       
    35 // MODULE DATA STRUCTURES
       
    36 
       
    37 // LOCAL FUNCTION PROTOTYPES
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 
       
    41 // ============================= LOCAL FUNCTIONS ===============================
       
    42 
       
    43 // ============================ MEMBER FUNCTIONS ===============================
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // CIptvTestLogger::
       
    47 // C++ default constructor can NOT contain any code, that
       
    48 // might leave.
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 EXPORT_C CIptvTestLogger* CIptvTestLogger::NewL(const TDesC& aDir, const TDesC& aName)
       
    52     {
       
    53     VCXLOGLO1(">>>CIptvTestLogger::NewL");
       
    54     CIptvTestLogger* self = new (ELeave) CIptvTestLogger( );
       
    55     CleanupStack::PushL(self);
       
    56     self->ConstructL(aDir, aName);
       
    57     CleanupStack::Pop();
       
    58     VCXLOGLO1("<<<CIptvTestLogger::NewL");
       
    59     return self;
       
    60     }
       
    61 // -----------------------------------------------------------------------------
       
    62 // CIptvTestLogger::~CIptvTestLogger
       
    63 // destructor
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 EXPORT_C CIptvTestLogger::~CIptvTestLogger()
       
    67     {
       
    68     VCXLOGLO1(">>>CIptvTestLogger::~CIptvTestLogger");
       
    69 
       
    70     VCXLOGLO1("<<<CIptvTestLogger::~CIptvTestLogger");
       
    71     }
       
    72 // -----------------------------------------------------------------------------
       
    73 // CIptvTestLogger::~CIptvTestLogger
       
    74 // destructor
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 EXPORT_C void CIptvTestLogger::Log(TRefByValue<const TDesC> aFmt,... )
       
    78     {
       
    79     VA_LIST argptr; //pointer to argument list
       
    80     VA_START( argptr, aFmt );
       
    81     RFileLogger::WriteFormat(iFileDir,iFileName,EFileLoggingModeAppend,aFmt,argptr);
       
    82     }
       
    83 // -----------------------------------------------------------------------------
       
    84 // CIptvTestLogger::CIptvTestLogger
       
    85 //
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 CIptvTestLogger::CIptvTestLogger()
       
    89     {
       
    90     VCXLOGLO1(">>>CIptvTestLogger::CIptvTestLogger");
       
    91 
       
    92     VCXLOGLO1("<<<CIptvTestLogger::CIptvTestLogger");
       
    93     }
       
    94 // -----------------------------------------------------------------------------
       
    95 // CIptvTestLogger::ConstructL()
       
    96 //
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 void CIptvTestLogger::ConstructL(const TDesC& aDir, const TDesC& aName)
       
   100     {
       
   101     VCXLOGLO1(">>>CIptvTestLogger::ConstructL");
       
   102     iFileDir.Append(aDir);
       
   103     iFileName.Append(aName);
       
   104     VCXLOGLO1("<<<CIptvTestLogger::ConstructL");
       
   105     }
       
   106 // ---------------------------------
       
   107 
       
   108 //  End of File