diff -r 6b1d113cdff3 -r 6638e7f4bd8f telephonyserverplugins/ctsydispatchlayer/src/ltsylogger.cpp --- a/telephonyserverplugins/ctsydispatchlayer/src/ltsylogger.cpp Mon May 03 13:37:20 2010 +0300 +++ b/telephonyserverplugins/ctsydispatchlayer/src/ltsylogger.cpp Thu May 06 15:10:38 2010 +0100 @@ -1,98 +1,98 @@ -// Copyright (c) 2008-2009 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: -// Logging macros for Tsy. These use the Comms Debug / Flogger V2 -// Framework. -// - - - -/** - @file - @internalComponent -*/ - -#include - -#ifdef _DEBUG -#include -#include - -const TInt KLineLength = 255; - -EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& aFnName, const TDesC8& aLayer) -/** -Constructor: log the function name entry -*/ - :iFnName(aFnName), iLayer(aLayer), iErr(KErrNone) - { - RFileLogger::WriteFormat(KTsySubSystem, iLayer, _L8(">>%S"), &iFnName); - }; - -EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& aFnName, const TDesC8& aLayer, TRefByValue aFmt, ...) -/** -Write the function name entry plus plus 8 bits formated list -*/ - :iFnName(aFnName), iLayer(aLayer), iErr(KErrNone) - { - VA_LIST list; - VA_START(list,aFmt); - TBuf8 line; - line.Append(_L8(">>")); - line.Append(iFnName); - line.Append(' '); - line.Append(aFmt); - RFileLogger::WriteFormat(KTsySubSystem, iLayer, line, list); - }; - -EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& aFnName, const TDesC8& aLayer, TRefByValue aFmt, ...) -/** -Write the function name entry plus 16 bits formated list -*/ - :iFnName(aFnName), iLayer(aLayer), iErr(KErrNone) - { - VA_LIST list; - VA_START(list,aFmt); - - TBuf line; - line.Copy(iFnName); - line.Insert(0,_L(">>")); - line.Append(' '); - line.Append(aFmt); - RFileLogger::WriteFormat(KTsySubSystem, iLayer, line, list); - }; - -EXPORT_C TLogEntryExit::~TLogEntryExit() -/** -Write the function name exit -*/ - { - if (iErr == KErrNone) - { - RFileLogger::WriteFormat(KTsySubSystem, iLayer, _L8("<<%S"), &iFnName); - } - else - { - RFileLogger::WriteFormat(KTsySubSystem, iLayer, _L8("<<%S [err=%d]"), &iFnName, iErr); - } - }; - -#else // #ifdef _DEBUG - -// stub export for urel builds -EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& /*aFnName*/, const TDesC8& /*aLayer*/){}; -EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& /*aFnName*/, const TDesC8& /*aLayer*/, TRefByValue /*aFmt*/, ...){}; -EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& /*aFnName*/, const TDesC8& /*aLayer*/, TRefByValue /*aFmt*/, ...){}; -EXPORT_C TLogEntryExit::~TLogEntryExit() {}; - -#endif // #ifdef _DEBUG +// Copyright (c) 2008-2009 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: +// Logging macros for Tsy. These use the Comms Debug / Flogger V2 +// Framework. +// + + + +/** + @file + @internalComponent +*/ + +#include + +#ifdef _DEBUG +#include +#include + +const TInt KLineLength = 255; + +EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& aFnName, const TDesC8& aLayer) +/** +Constructor: log the function name entry +*/ + :iFnName(aFnName), iLayer(aLayer), iErr(KErrNone) + { + RFileLogger::WriteFormat(KTsySubSystem, iLayer, _L8(">>%S"), &iFnName); + }; + +EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& aFnName, const TDesC8& aLayer, TRefByValue aFmt, ...) +/** +Write the function name entry plus plus 8 bits formated list +*/ + :iFnName(aFnName), iLayer(aLayer), iErr(KErrNone) + { + VA_LIST list; + VA_START(list,aFmt); + TBuf8 line; + line.Append(_L8(">>")); + line.Append(iFnName); + line.Append(' '); + line.Append(aFmt); + RFileLogger::WriteFormat(KTsySubSystem, iLayer, line, list); + }; + +EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& aFnName, const TDesC8& aLayer, TRefByValue aFmt, ...) +/** +Write the function name entry plus 16 bits formated list +*/ + :iFnName(aFnName), iLayer(aLayer), iErr(KErrNone) + { + VA_LIST list; + VA_START(list,aFmt); + + TBuf line; + line.Copy(iFnName); + line.Insert(0,_L(">>")); + line.Append(' '); + line.Append(aFmt); + RFileLogger::WriteFormat(KTsySubSystem, iLayer, line, list); + }; + +EXPORT_C TLogEntryExit::~TLogEntryExit() +/** +Write the function name exit +*/ + { + if (iErr == KErrNone) + { + RFileLogger::WriteFormat(KTsySubSystem, iLayer, _L8("<<%S"), &iFnName); + } + else + { + RFileLogger::WriteFormat(KTsySubSystem, iLayer, _L8("<<%S [err=%d]"), &iFnName, iErr); + } + }; + +#else // #ifdef _DEBUG + +// stub export for urel builds +EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& /*aFnName*/, const TDesC8& /*aLayer*/){}; +EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& /*aFnName*/, const TDesC8& /*aLayer*/, TRefByValue /*aFmt*/, ...){}; +EXPORT_C TLogEntryExit::TLogEntryExit(const TDesC8& /*aFnName*/, const TDesC8& /*aLayer*/, TRefByValue /*aFmt*/, ...){}; +EXPORT_C TLogEntryExit::~TLogEntryExit() {}; + +#endif // #ifdef _DEBUG