diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-06 08:58:27 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-06 08:58:27 +0000 |
commit | b61ba851da0157ace3bdfc1ebbf87156b0b76413 (patch) | |
tree | d6c567db57af1eb09c254a8bee13c305282334f8 /plugins/Quotes/Log.cpp | |
parent | a4c70f6bedb25e5cffb08dfc5cbc2597d1642d6b (diff) |
protocols plugins moved to protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@327 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/Log.cpp')
-rw-r--r-- | plugins/Quotes/Log.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/plugins/Quotes/Log.cpp b/plugins/Quotes/Log.cpp deleted file mode 100644 index d692763bad..0000000000 --- a/plugins/Quotes/Log.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "StdAfx.h"
-#include "Log.h"
-#include "LightMutex.h"
-#include "EconomicRateInfo.h"
-#include "CreateFilePath.h"
-
-namespace
-{
- CLightMutex g_Mutex;
-
- tstring get_log_file_name()
- {
- return CreateFilePath(_T("Quotes.log"));
- }
-
- bool is_log_enabled()
- {
-#ifdef _DEBUG
- return true;
-#else
- return (1 == DBGetContactSettingByte(NULL,QUOTES_PROTOCOL_NAME,DB_STR_ENABLE_LOG,false));
-#endif
- }
-
- void do_log(const tstring& rsFileName,ESeverity nSeverity,const tstring& rsMsg)
- {
- CGuard<CLightMutex> guard(g_Mutex);
- tofstream file(rsFileName.c_str(),std::ios::ate|std::ios::app);
- if(file.good())
- {
- TCHAR szTime[20];
-// TCHAR sz[10000+1];
- _tstrtime_s(szTime);
- file << szTime << _T(" ================================>\n") << rsMsg << _T("\n\n");
-
-// size_t cBytes = rsMsg.size();
-// const TCHAR* p = rsMsg.c_str();
-// for(size_t c = 0;c < cBytes;c += 10000,p+=10000)
-// {
-// _tcsncpy_s(sz,p,10000);
-// file << sz;
-// }
-//
-// file << "\n\n";
- }
- }
-}
-
-void LogIt(ESeverity nSeverity,const tstring& rsMsg)
-{
- if(is_log_enabled())
- {
- tstring sFileName = get_log_file_name();
- do_log(sFileName,nSeverity,rsMsg);
- }
-}
|